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

Unified Diff: editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTests.java

Issue 83793016: Issue 13549. Tweaks for arguments list completion. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTests.java
diff --git a/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTests.java b/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTests.java
index e8c99dccd061f0d9cec7c95e69873405b6e604e5..f4b816ccedce52763b8bf0b01ddfb233acf17116 100644
--- a/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTests.java
+++ b/editor/tools/plugins/com.google.dart.engine.services_test/src/com/google/dart/engine/services/completion/CompletionTests.java
@@ -1481,6 +1481,16 @@ public class CompletionTests extends CompletionTestCase {
test("typedef int fnint(int k); fn!1int x;", "1+fnint");
}
+ public void testCompletion_arguments_ignoreEmpty() throws Exception {
+ test(src(//
+ "class A {",
+ " test() {}",
+ "}",
+ "main(A a) {",
+ " a.test(!1);",
+ "}"), "1-test");
+ }
+
public void testCompletion_as_asIdentifierPrefix() throws Exception {
test(src(//
"main(p) {",
@@ -1537,6 +1547,17 @@ public class CompletionTests extends CompletionTestCase {
test("class X { X(this.field); int f!1ield;}", "1+field");
}
+ public void testCompletion_constructorArguments_showOnlyCurrent() throws Exception {
+ test(src(//
+ "class A {",
+ " A.first(int p);",
+ " A.second(double p);",
+ "}",
+ "main() {",
+ " new A.first(!1);",
+ "}"), "1+A.first", "1-A.second");
+ }
+
public void testCompletion_double_inFractionPart() throws Exception {
test(src(//
"main() {",
« no previous file with comments | « editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/completion/CompletionEngine.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698