dart-sdk/pkg/test_runner
Robert Nystrom 94b34b2b30 Refine how unspecified static error expectations are defined.
The previous system let you use this to define an "unspecified error":

   int i = "bad";
   // [unspecified error]

The marker comment meant that *both* front ends had to report some error
on the previous line, but any error at any position was considered
acceptable.

Unfortunately, this doesn't let us incrementally specify an error for
one front end while leaving it unspecified for the other. This means
that when, say, the analyzer implementation lands first, we can't pin
down its errors while still leaving the CFE errors unspecified until
its ready.

This addresses that by making "unspecified" a property of each front
end, not the error itself. The new syntax is:

   int i = "bad";
   //       ^^^
   // [analyzer] unspecified
   // [cfe] unspecified

This means the same thing as the previous example: both front ends must
report some error on the previous line. The column information is
authored as a best effort, but ignored.

Now, let's say the CFE implementation lands. The above can be changed
to:

   int i = "bad";
   //       ^^^
   // [analyzer] unspecified
   // [cfe] Real error message.

At this point, the CFE test must report that exact error at that exact
position and message. But the analyzer is still free to report any
error code anywhere on that line.

This syntax is a little more verbose, but it's simpler and more
flexible.

Change-Id: I37f937d245fd8ec8054acb6128256f9fff6241e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109728
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-07-24 02:04:22 +00:00
..
bin Catch the test_runner codebase up to somewhat modern practices. 2019-06-15 01:02:50 +00:00
lib/src Refine how unspecified static error expectations are defined. 2019-07-24 02:04:22 +00:00
test Refine how unspecified static error expectations are defined. 2019-07-24 02:04:22 +00:00
tool Catch the test_runner codebase up to somewhat modern practices. 2019-06-15 01:02:50 +00:00
.gitignore
analysis_options.yaml Enable "comment_references" lint and fix violations. 2019-07-12 23:53:13 +00:00
pubspec.yaml