Commit 9c3e1a1
Remove support for multi-line error messages in static error tests.
The static error test format allows an expected error message to contain newlines like:
```dart
some bad code;
// [cfe] The error message
// is two lines long.
```
Here, the expected error is "The error message\nistwo lines long."
This has an unfortunate side effect in that if you have a comment
immediately after a static error expectation, it will be treated as part
of the expected error:
```dart
some bad code;
// [cfe] Error.
// Unrelated comment.
```
This will expect the CFE to report "Error.\nUnrelated comment."
I looked at every static error test and there are no intentional uses
of multi-line expectations. The only two I found were both bugs.
Since this functionality is unused and error-prone, this CL removes it.
Error expectations can only be one line.
Fix #60137.
Change-Id: I7edb1f60a0c87d4160b93810806de49bc8f55b15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412185
Auto-Submit: Bob Nystrom <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Johnni Winther <[email protected]>1 parent 13d11b4 commit 9c3e1a1
File tree
2 files changed
+8
-50
lines changed- pkg/test_runner
- lib/src
- test
2 files changed
+8
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | 507 | | |
512 | 508 | | |
513 | 509 | | |
| |||
602 | 598 | | |
603 | 599 | | |
604 | 600 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | 601 | | |
627 | 602 | | |
628 | 603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
| 344 | + | |
| 345 | + | |
352 | 346 | | |
353 | 347 | | |
354 | 348 | | |
355 | 349 | | |
356 | 350 | | |
357 | 351 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
| 352 | + | |
368 | 353 | | |
369 | 354 | | |
370 | 355 | | |
| |||
425 | 410 | | |
426 | 411 | | |
427 | 412 | | |
428 | | - | |
429 | | - | |
| 413 | + | |
430 | 414 | | |
431 | | - | |
| 415 | + | |
432 | 416 | | |
433 | 417 | | |
434 | 418 | | |
435 | | - | |
436 | | - | |
437 | | - | |
| 419 | + | |
| 420 | + | |
438 | 421 | | |
439 | 422 | | |
440 | 423 | | |
| |||
0 commit comments