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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractMethodRefactoringTest.java

Issue 11361018: Cascade should have type set. Tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractMethodRefactoringTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractMethodRefactoringTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractMethodRefactoringTest.java
index 8d9af2073593f92ab2baaab1f7445e4608358557..d9c2310fdc5a31abf81640ea54416490f11aaf7f 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractMethodRefactoringTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/ExtractMethodRefactoringTest.java
@@ -878,6 +878,30 @@ public final class ExtractMethodRefactoringTest extends RefactoringTest {
"");
}
+ public void test_singleExpression_cascade() throws Exception {
+ setTestUnitContent(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "dynaFunction() {}",
+ "main() {",
+ " String s = '';",
+ " var v = s..length; // marker",
+ "}",
+ "");
+ selectionStart = findOffset("s..");
+ selectionEnd = findOffset("; // marker");
+ doSuccessfullRefactoring();
+ assertTestUnitContent(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "dynaFunction() {}",
+ "main() {",
+ " String s = '';",
+ " var v = res(s); // marker",
+ "}",
+ "",
+ "String res(String s) => s..length;",
+ "");
+ }
+
public void test_singleExpression_Dynamic() throws Exception {
setTestUnitContent(
"// filler filler filler filler filler filler filler filler filler filler",
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/TypeContextChecker.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698