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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/cleanup/MigrateCleanUpTest.java

Issue 10962014: Fixes for raw string and block clean ups (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/cleanup/MigrateCleanUpTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/cleanup/MigrateCleanUpTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/cleanup/MigrateCleanUpTest.java
index a1ec8f4523c85b3c7224bc88fa6e623c5f2b0d94..89935c6cf87c9b40673d04e9d8323522d20941e5 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/cleanup/MigrateCleanUpTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/cleanup/MigrateCleanUpTest.java
@@ -463,4 +463,42 @@ public final class MigrateCleanUpTest extends AbstractCleanUpTest {
assertCleanUp(cleanUp, initial, expected);
}
+ public void test_1M1_rawString_adjacent() throws Exception {
+ ICleanUp cleanUp = new Migrate_1M1_rawString_CleanUp();
+ String initial = makeSource(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "main() {",
+ " var s1 = '111' 'aaa';",
+ " var s2 = r'222' r'bbb';",
+ " var s3 = @'333' r'ccc';",
+ " var s4 = r'444' @'ddd';",
+ " var s5 = @'555' @'eee';",
+ "}",
+ "");
+ String expected = makeSource(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "main() {",
+ " var s1 = '111' 'aaa';",
+ " var s2 = r'222' r'bbb';",
+ " var s3 = r'333' r'ccc';",
+ " var s4 = r'444' r'ddd';",
+ " var s5 = r'555' r'eee';",
+ "}",
+ "");
+ assertCleanUp(cleanUp, initial, expected);
+ }
+
+ public void test_1M1_rawString_native() throws Exception {
+ ICleanUp cleanUp = new Migrate_1M1_rawString_CleanUp();
+ String initial = makeSource(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "foo() native @'abc';",
+ "");
+ String expected = makeSource(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "foo() native r'abc';",
+ "");
+ assertCleanUp(cleanUp, initial, expected);
+ }
+
}

Powered by Google App Engine
This is Rietveld 408576698