[messages] Convert error reporting in pkg/compiler to use withArguments.
Changes the test `pkg/compiler/test/end_to_end/user_crash_test.dart` so that when it reports the `cantReadFile` diagnostic, it does so using `withArguments` rather than `withArgumentsOld`. Once all calls to `withArgumentsOld` are removed (this is one of the last), I will delete it, which will substantially simplify the diagnostic reporting infrastructure in `pkg/front_end`. Change-Id: I6a6a696492b8beb73819528c4c48902f6cd57df2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/479062 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Nate Biggs <natebiggs@google.com>
This commit is contained in:
@@ -27,9 +27,9 @@ main() {
|
||||
expectedExceptions: [EXCEPTION],
|
||||
);
|
||||
|
||||
var cantReadFile = diag.cantReadFile.withArgumentsOld(
|
||||
entryPoint,
|
||||
EXCEPTION,
|
||||
var cantReadFile = diag.cantReadFile.withArguments(
|
||||
uri: entryPoint,
|
||||
details: EXCEPTION,
|
||||
);
|
||||
List<String> expectedLines = [
|
||||
"Error: ${cantReadFile.problemMessage}",
|
||||
|
||||
Reference in New Issue
Block a user