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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 2968763002: Issue 30028. Fix for invoking loadLibrary() for deferred library with invalid URI. (Closed)
Patch Set: Created 3 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 | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 7876d9da7f1dd5bfebbaecd20540bebab158a2f8..bc09e54f06e5c4b4e26f75e4652b1193dfd8a679 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -6002,6 +6002,23 @@ f() sync* {
verify([source]);
}
+ test_deferredImportWithInvalidUri() async {
+ Source source = addSource(r'''
+import '[invalid uri]' deferred as p;
+main() {
+ p.loadLibrary();
+}''');
+ await computeAnalysisResult(source);
+ if (enableNewAnalysisDriver) {
+ assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+ } else {
+ assertErrors(source, [
+ CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+ StaticWarningCode.UNDEFINED_IDENTIFIER
+ ]);
+ }
+ }
+
test_sharedDeferredPrefix() async {
await resolveWithErrors(<String>[
r'''
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698