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

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

Issue 1205373002: Translate package URIs to resource URIs for diagnostics. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Use resourceUri instead of readableUri in source spans. Created 5 years, 6 months 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
« no previous file with comments | « tests/compiler/dart2js/package_root_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/show_package_warnings_test.dart
diff --git a/tests/compiler/dart2js/show_package_warnings_test.dart b/tests/compiler/dart2js/show_package_warnings_test.dart
index eb9a441fc9b202206103fbee5e8552b08e9acf81..de518f9ccc1360e28e488810af9056a90c070ffc 100644
--- a/tests/compiler/dart2js/show_package_warnings_test.dart
+++ b/tests/compiler/dart2js/show_package_warnings_test.dart
@@ -69,14 +69,26 @@ void test(List<Uri> entryPoints,
'Unexpected errors: ${collector.errors}');
Expect.equals(warnings, collector.warnings.length,
'Unexpected warnings: ${collector.warnings}');
+ checkUriSchemes(collector.warnings);
Expect.equals(hints, collector.hints.length,
'Unexpected hints: ${collector.hints}');
+ checkUriSchemes(collector.hints);
Expect.equals(infos, collector.infos.length,
'Unexpected infos: ${collector.infos}');
+ checkUriSchemes(collector.infos);
print('==================================================================');
}));
}
+void checkUriSchemes(Iterable<DiagnosticMessage> messages) {
+ for (DiagnosticMessage message in messages) {
+ if (message.uri != null) {
+ Expect.notEquals('package', message.uri.scheme,
+ "Unexpected package uri `${message.uri}` in message: $message");
+ }
+ }
+}
+
void main() {
test([Uri.parse('memory:main.dart')],
showPackageWarnings: true,
« no previous file with comments | « tests/compiler/dart2js/package_root_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698