Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Issue 9559007: Update test.dart for detection output of machine formatted errors (Closed)

Created:
8 years, 9 months ago by zundel
Modified:
8 years, 9 months ago
Reviewers:
Bill Hesse, scheglov
CC:
reviews_dartlang.org, Mads Ager (google)
Visibility:
Public.

Description

Update test.dart for detection output of machine formatted errors This change causes the 'dartc' tests to be more sensitive to the difference between a static type error and a compilation error. Instead of relying on the return value from the test being 0 or non zero, the code now turns on '--error_format machine' and checks type error level 'ERROR' or 'WARNING' and the type of error for 'STATIC_TYPE' if there is a static type error. A new annotation format adapted from multitests is introduced for standard test cases: int foo = "hello"; /// static type error The above annotation means that a static type error is expected. Currently enforcement is very lenient. There must be at least as many STATIC_TYPE error messages as there are '/// static type error' annotations (and no ERROR level messages.) Committed: https://code.google.com/p/dart/source/detail?r=4895

Patch Set 1 : Added diagnostic for @static-clean conflicts #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -63 lines) Patch
M compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java View 2 chunks +17 lines, -6 lines 0 comments Download
M compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java View 1 chunk +2 lines, -0 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/PrettyErrorFormatterTest.java View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/co19/co19-compiler.status View 1 chunk +0 lines, -2 lines 0 comments Download
M tests/language/language.status View 3 chunks +4 lines, -1 line 0 comments Download
M tests/language/src/Arithmetic2Test.dart View 2 chunks +2 lines, -1 line 2 comments Download
M tests/language/src/BoolTest.dart View 1 chunk +2 lines, -1 line 2 comments Download
M tests/language/src/NamedParametersTypeTest.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/src/Prefix22NegativeTest.dart View 1 chunk +2 lines, -2 lines 1 comment Download
M tests/language/src/Prefix23NegativeTest.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/testing/dart/multitest.dart View 2 chunks +4 lines, -2 lines 2 comments Download
M tools/testing/dart/test_progress.dart View 1 chunk +7 lines, -0 lines 0 comments Download
M tools/testing/dart/test_runner.dart View 10 chunks +210 lines, -17 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 12 chunks +44 lines, -24 lines 6 comments Download

Messages

Total messages: 3 (0 generated)
zundel
(see earlier version at https://chromiumcodereview.appspot.com/9479034/) I merged other changes since then and didn't want them ...
8 years, 9 months ago (2012-03-01 20:00:49 UTC) #1
Bill Hesse
LGTM. Are the boolean flag arguments needed on doTest because of the non-multitest case, and ...
8 years, 9 months ago (2012-03-02 08:55:18 UTC) #2
zundel
8 years, 9 months ago (2012-03-02 23:51:00 UTC) #3
http://codereview.chromium.org/9559007/diff/5016/tests/language/src/Arithmeti...
File tests/language/src/Arithmetic2Test.dart (right):

http://codereview.chromium.org/9559007/diff/5016/tests/language/src/Arithmeti...
tests/language/src/Arithmetic2Test.dart:23: f();
On 2012/03/02 08:55:18, Bill Hesse wrote:
> Extra space.

Done.

http://codereview.chromium.org/9559007/diff/5016/tests/language/src/BoolTest....
File tests/language/src/BoolTest.dart (right):

http://codereview.chromium.org/9559007/diff/5016/tests/language/src/BoolTest....
tests/language/src/BoolTest.dart:10: Expect.equals(true, true);
On 2012/03/02 08:55:18, Bill Hesse wrote:
> Extra space.

Done.

http://codereview.chromium.org/9559007/diff/5016/tests/language/src/Prefix22N...
File tests/language/src/Prefix22NegativeTest.dart (right):

http://codereview.chromium.org/9559007/diff/5016/tests/language/src/Prefix22N...
tests/language/src/Prefix22NegativeTest.dart:7: // VMOptions=
--enable_type_errors
reverted

http://codereview.chromium.org/9559007/diff/5016/tools/testing/dart/multitest...
File tools/testing/dart/multitest.dart (right):

http://codereview.chromium.org/9559007/diff/5016/tools/testing/dart/multitest...
tools/testing/dart/multitest.dart:161: enableFatalTypeErrors,
On 2012/03/02 08:55:18, Bill Hesse wrote:
> Can't you remove all the boolean flag arguments from doTest if you pass the
> outcome, and do the tests in doTest?
I think you are right, I added TODO.

http://codereview.chromium.org/9559007/diff/5016/tools/testing/dart/test_suit...
File tools/testing/dart/test_suite.dart (right):

http://codereview.chromium.org/9559007/diff/5016/tools/testing/dart/test_suit...
tools/testing/dart/test_suite.dart:824: matches =
staticCleanRegExp.allMatches(contents);
On 2012/03/02 08:55:18, Bill Hesse wrote:
> Is this overkill?  Why not just a single hasMatch?
I did that because I decided that multiple matches s/b fatal

http://codereview.chromium.org/9559007/diff/5016/tools/testing/dart/test_suit...
tools/testing/dart/test_suite.dart:852: for (var i in
staticTypeRegExp.allMatches(contents)) {
On 2012/03/02 08:55:18, Bill Hesse wrote:
> Var dummy?
> There is really no length field?  It is an iterator?

yes, its an Iterator.
http://api.dartlang.org/dart_core/RegExp.html

Powered by Google App Engine
This is Rietveld 408576698