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

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

Issue 820763002: Fix for extracting from interpolated string. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/refactoring/extract_local.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/extract_local_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
index 6832e2259095655de16f2a6c236d9450565c0102..1010ec4a652fb8a113c5f1dac17a543bb9eb1de1 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
@@ -911,6 +911,26 @@ main() {
''');
}
+ test_stringLiteralPart() {
+ indexTestUnit(r'''
+main() {
+ int x = 1;
+ int y = 2;
+ print('$x+$y=${x+y}');
+}
+''');
+ _createRefactoringForString(r'$x+$y');
+ // apply refactoring
+ return _assertSuccessfulRefactoring(r'''
+main() {
+ int x = 1;
+ int y = 2;
+ var res = '$x+$y';
+ print('${res}=${x+y}');
+}
+''');
+ }
+
Future _assertInitialConditions_fatal_selection() {
return refactoring.checkInitialConditions().then((status) {
assertRefactoringStatus(
« no previous file with comments | « pkg/analysis_server/lib/src/services/refactoring/extract_local.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698