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

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

Issue 1492843003: Don't attempt to create a file for non-Dart imports. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 b9b68572ed932a35be08a129674d021e1d615ce1..a54eb0085168550511eccd2fab76a53f3c558375 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -1493,6 +1493,23 @@ import 'my_file.dart';
expect(fileEdit.edits[0].replacement, contains('library my_file;'));
}
+ test_createFile_forImport_BAD_inPackage_lib_justLib() async {
+ provider.newFile('/projects/my_package/pubspec.yaml', 'name: my_package');
+ testFile = '/projects/my_package/test.dart';
+ resolveTestUnit('''
+import 'lib';
+''');
+ await assertNoFix(DartFixKind.CREATE_FILE);
+ }
+
+ test_createFile_forImport_BAD_notDart() async {
+ testFile = '/my/project/bin/test.dart';
+ resolveTestUnit('''
+import 'my_file.txt';
+''');
+ await assertNoFix(DartFixKind.CREATE_FILE);
+ }
+
test_createFile_forImport_inPackage_lib() async {
provider.newFile('/projects/my_package/pubspec.yaml', 'name: my_package');
testFile = '/projects/my_package/lib/test.dart';
« 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