dart-sdk/pkg/test_runner
Lasse R.H. Nielsen e85042b403 Allow error test expectations to omit the implicit line.
Error tests with explicit line/column markers, like
 [error line 123, column 456]
currently require both "line" and "column".
All existing occurrences of `[error line 123, column 456]` always
refer to the most recent non-comment line *just like* the `// ^^` lines,
so omitting the line, and having the most recent non-comment line
as the *default* line, seems reasonable.

This CL makes the line optional, the new format without a "line" entry
will be just `[error column 456]`.

This allows files to change the number of lines in the code without
invalidating any later expectations.
(Or, say, remove a comment line at the top of the file!)

Omits the line entry by default when writing/updating expectations.

Change-Id: Ia0c95bf804a1c6b11c0c1621bfd481e43f8fa0c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200429
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-14 12:00:13 +00:00
..
bin fix sort_directives violations 2021-04-20 22:21:28 +00:00
lib Allow error test expectations to omit the implicit line. 2021-06-14 12:00:13 +00:00
test Allow error test expectations to omit the implicit line. 2021-06-14 12:00:13 +00:00
tool Add a tool to detect orphaned Dart files in "test/". 2021-05-11 01:23:03 +00:00
.gitignore
analysis_options.yaml Turn on the "isEmpty" and "isNotEmpty" lints and fix violations. 2020-08-31 18:33:48 +00:00
pubspec.yaml Add a tool to detect orphaned Dart files in "test/". 2021-05-11 01:23:03 +00:00