Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: tests/compiler/dart2js/part_of_test.dart

Issue 1415463022: Use DiagnosticMessage in MockCompiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/part_of_test.dart
diff --git a/tests/compiler/dart2js/part_of_test.dart b/tests/compiler/dart2js/part_of_test.dart
index 979d9ca7bd1365e2ce26d109fdb923743ced8b12..3a134dc767404a599c4b3bdff47a57ec7498bc2a 100644
--- a/tests/compiler/dart2js/part_of_test.dart
+++ b/tests/compiler/dart2js/part_of_test.dart
@@ -27,13 +27,14 @@ void main() {
compiler.registerSource(partUri, PART_SOURCE);
asyncTest(() => compiler.libraryLoader.loadLibrary(libraryUri).then((_) {
- print('errors: ${compiler.errors}');
- print('warnings: ${compiler.warnings}');
- Expect.isTrue(compiler.errors.isEmpty);
- Expect.equals(1, compiler.warnings.length);
+ DiagnosticCollector collector = compiler.diagnosticCollector;
+ print('errors: ${collector.errors}');
+ print('warnings: ${collector.warnings}');
+ Expect.isTrue(collector.errors.isEmpty);
+ Expect.equals(1, collector.warnings.length);
Expect.equals(MessageKind.LIBRARY_NAME_MISMATCH,
- compiler.warnings[0].message.kind);
+ collector.warnings.first.messageKind);
Expect.equals('foo',
- compiler.warnings[0].message.arguments['libraryName'].toString());
+ collector.warnings.first.message.arguments['libraryName'].toString());
}));
}

Powered by Google App Engine
This is Rietveld 408576698