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

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

Issue 10562020: Clean up DartAstUtilities.getElement(), analysis should provide element for every identifier (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartAstUtilities.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e25c6491095de6ff38161d4d88972c6cf6c904c9..ee0eb18df5ca2a7b1cecf1e0c0cada7f7771921d 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
@@ -287,6 +287,37 @@ public class DartElementLocatorTest extends TestCase {
3);
}
+ public void test_Function_onDeclaration() throws Exception {
+ testElementLocator(
+ formatLines(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "process(x) {}",
+ "test() {",
+ "}",
+ ""),
+ "est() {",
+ DartFunction.class,
+ "test() {",
+ 4);
+ }
+
+ public void test_Function_onReference() throws Exception {
+ testElementLocator(
+ formatLines(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "process(x) {}",
+ "test() {",
+ "}",
+ "f() {",
+ " test();",
+ "}",
+ ""),
+ "test();",
+ DartFunction.class,
+ "test() {",
+ 4);
+ }
+
public void test_Method_getter_onDeclaration() throws Exception {
testElementLocator(
formatLines(
@@ -323,6 +354,22 @@ public class DartElementLocatorTest extends TestCase {
4);
}
+ public void test_Method_onDeclaration() throws Exception {
+ testElementLocator(
+ formatLines(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "process(x) {}",
+ "class A {",
+ " test() {",
+ " }",
+ "}",
+ ""),
+ "est() {",
+ Method.class,
+ "test() {",
+ 4);
+ }
+
public void test_Method_onReference() throws Exception {
testElementLocator(
formatLines(
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/ast/DartAstUtilities.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698