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

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

Issue 1059133003: Issue 23091. Fix for adding import prefix before string-interpolated identifier. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
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 b2a54c63f51dec64b232979b24a6a37a5576662a..0678125b678b099a4fbba4771bc8d81fdb197d3b 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
@@ -66,6 +66,28 @@ main() {
''');
}
+ test_createChange_add_interpolationExpression() {
+ indexTestUnit(r'''
+import 'dart:async';
+main() {
+ Future f;
+ print('Future type: $Future');
+}
+''');
+ // configure refactoring
+ _createRefactoring("import 'dart:async");
+ expect(refactoring.refactoringName, 'Rename Import Prefix');
+ refactoring.newName = 'newName';
+ // validate change
+ return assertSuccessfulRefactoring(r'''
+import 'dart:async' as newName;
+main() {
+ newName.Future f;
+ print('Future type: ${newName.Future}');
+}
+''');
+ }
+
test_createChange_change_className() {
indexTestUnit('''
import 'dart:math' as test;

Powered by Google App Engine
This is Rietveld 408576698