|
|
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
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
|
Total messages: 3 (0 generated)
|