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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java

Issue 11365011: Better warning to function-like call of getter; Quick Fix for it (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/correction/QuickFixProcessorTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java
index 43b307755c7a4cc5fac87fe957ea6b45dc91df7e..fd92391214089030f6a1ec0cbc00769567818d01 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/correction/QuickFixProcessorTest.java
@@ -561,6 +561,30 @@ public final class QuickFixProcessorTest extends AbstractDartTest {
"");
}
+ public void test_removeParentheses_inGetterInvocation() throws Exception {
+ proposalNamePrefix = "Remove parentheses in getter invocation";
+ setTestUnitContent(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " int get foo => 0;",
+ "}",
+ "main() {",
+ " A a = new A();",
+ " a.foo();",
+ "}",
+ "");
+ assertQuickFix(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " int get foo => 0;",
+ "}",
+ "main() {",
+ " A a = new A();",
+ " a.foo;",
+ "}",
+ "");
+ }
+
public void test_unresolvedClass_useSimilar() throws Exception {
proposalNamePrefix = "Change to 'Person'";
setTestUnitContent(
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/correction/QuickFixProcessor.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698