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

Unified Diff: pkg/analysis_server/test/services/refactoring/rename_import_test.dart

Issue 640253004: Fix for renaming import without an import prefix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/test/edit/refactoring_test.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/refactoring/rename_import_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
index 6c31e3d69a28f350f207ef80830447fb684ed505..2d15c49627cdabcd9ce6dd4a0815e5b21dd41b2a 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
@@ -5,10 +5,10 @@
library test.services.refactoring.rename_import;
import 'package:analysis_server/src/protocol.dart';
-import '../../reflective_tests.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:unittest/unittest.dart';
+import '../../reflective_tests.dart';
import 'abstract_rename.dart';
@@ -168,6 +168,20 @@ main() {
''');
}
+ test_oldName_empty() {
+ indexTestUnit('''
+import 'dart:math';
+import 'dart:async';
+main() {
+ Future f;
+}
+''');
+ // configure refactoring
+ _createRefactoring("import 'dart:async");
+ expect(refactoring.refactoringName, 'Rename Import Prefix');
+ expect(refactoring.oldName, '');
+ }
+
void _createRefactoring(String search) {
ImportDirective directive =
findNodeAtString(search, (node) => node is ImportDirective);
« no previous file with comments | « pkg/analysis_server/test/edit/refactoring_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698