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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java

Issue 10582003: Issue 1355. Support for call(). Tweaks for element locator and rename refactoring (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check target range Created 8 years, 6 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.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
index ee0eb18df5ca2a7b1cecf1e0c0cada7f7771921d..b4bfafc3d25b8d6ca0e8bbb6586c83235516e467 100644
--- a/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/utilities/ast/DartElementLocatorTest.java
@@ -46,6 +46,7 @@ public class DartElementLocatorTest extends TestCase {
@SuppressWarnings("unchecked")
private static <T extends DartElement> T assertLocation(CompilationUnit unit, String posMarker,
Class<?> expectedElementType, String expectedMarker, int expectedLen) throws Exception {
+ TestProject.waitForAutoBuild();
String source = unit.getSource();
// prepare DartUnit
DartUnit dartUnit;
@@ -188,6 +189,7 @@ public class DartElementLocatorTest extends TestCase {
" aaa.A a;",
"}",
"")).getResource();
+ TestProject.waitForAutoBuild();
DartLibrary libraryA = testProject.getDartProject().getDartLibrary(libResourceA);
DartLibrary libraryTest = testProject.getDartProject().getDartLibrary(resourceTest);
// usage of "aaa" = "libraryA"
@@ -318,6 +320,25 @@ public class DartElementLocatorTest extends TestCase {
4);
}
+ public void test_Method_call() throws Exception {
+ testElementLocator(
+ formatLines(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " call() {",
+ " }",
+ "}",
+ "f() {",
+ " A a = new A();",
+ " a(); // marker",
+ "}",
+ ""),
+ "; // marker",
+ Method.class,
+ "call() {",
+ 4);
+ }
+
public void test_Method_getter_onDeclaration() throws Exception {
testElementLocator(
formatLines(

Powered by Google App Engine
This is Rietveld 408576698