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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 1816163002: Issue 26050. Don't suggest to import an already imported (with 'show') library again. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index b0592797e9817c9d79a68aa5b647258ccee42969..d7935399f8d8b578fbe5b7c35aee4abdc6445850 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -3460,7 +3460,35 @@ main() {
''');
}
- test_importLibraryShow() async {
+ test_importLibraryShow_project() async {
+ testFile = '/project/bin/test.dart';
+ addSource(
+ '/project/bin/lib.dart',
+ '''
+class A {}
+class B {}
+''');
+ resolveTestUnit('''
+import 'lib.dart' show A;
+main() {
+ A a;
+ B b;
+}
+''');
+ performAllAnalysisTasks();
+ await assertNoFix(DartFixKind.IMPORT_LIBRARY_PROJECT);
+ await assertHasFix(
+ DartFixKind.IMPORT_LIBRARY_SHOW,
+ '''
+import 'lib.dart' show A, B;
+main() {
+ A a;
+ B b;
+}
+''');
+ }
+
+ test_importLibraryShow_sdk() async {
resolveTestUnit('''
import 'dart:async' show Stream;
main() {
@@ -3468,6 +3496,7 @@ main() {
Future f = null;
}
''');
+ await assertNoFix(DartFixKind.IMPORT_LIBRARY_SDK);
await assertHasFix(
DartFixKind.IMPORT_LIBRARY_SHOW,
'''
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698