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

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

Issue 1901923002: Add UNDEFINED_HIDDEN_NAME, UNDEFINED_SHOWN_NAME (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: less "is" Created 4 years, 8 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
Index: pkg/analyzer/test/generated/hint_code_test.dart
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
index 168c471b77b27e84b097f4c42aa36ab252430c12..3c4ef87d61ae15dd967791daf644988ad7f2aa3d 100644
--- a/pkg/analyzer/test/generated/hint_code_test.dart
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -1710,6 +1710,50 @@ m(i) {
verify([source]);
}
+ void test_undefinedIdentifier_importHide() {
+ Source source = addSource(r'''
+library L;
+import 'lib1.dart' hide a;''');
+ addNamedSource("/lib1.dart", "library lib1;");
+ computeLibrarySourceErrors(source);
+ assertErrors(
+ source,
+ [HintCode.UNUSED_IMPORT, HintCode.UNDEFINED_HIDDEN_NAME]);
+ verify([source]);
+ }
+
+ void test_undefinedIdentifier_importShow() {
+ Source source = addSource(r'''
+library L;
+import 'lib1.dart' show a;''');
+ addNamedSource("/lib1.dart", "library lib1;");
+ computeLibrarySourceErrors(source);
+ assertErrors(
+ source,
+ [HintCode.UNUSED_IMPORT, HintCode.UNDEFINED_SHOWN_NAME]);
+ verify([source]);
+ }
+
+ void test_undefinedIdentifier_exportHide() {
+ Source source = addSource(r'''
+library L;
+export 'lib1.dart' hide a;''');
+ addNamedSource("/lib1.dart", "library lib1;");
+ computeLibrarySourceErrors(source);
+ assertErrors(source, [HintCode.UNDEFINED_HIDDEN_NAME]);
+ verify([source]);
+ }
+
+ void test_undefinedIdentifier_exportShow() {
+ Source source = addSource(r'''
+library L;
+export 'lib1.dart' show a;''');
+ addNamedSource("/lib1.dart", "library lib1;");
+ computeLibrarySourceErrors(source);
+ assertErrors(source, [HintCode.UNDEFINED_SHOWN_NAME]);
+ verify([source]);
+ }
+
void test_undefinedGetter() {
Source source = addSource(r'''
class A {}
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698