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

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

Issue 11043024: Fix for field resolution for cascade, tests for ensure this (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
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.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 9a75b17b404094782613958f86223dcb96b4abf0..ac40c62565502d5771f75e18ccd63e25e5481c2a 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
@@ -369,6 +369,27 @@ public class DartElementLocatorTest extends TestCase {
3);
}
+ public void test_FieldElement_onCascade() throws Exception {
+ testElementLocator(
+ formatLines(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "process(x) {}",
+ "class A {",
+ " var foo;",
+ " var test;",
+ "}",
+ "main() {",
+ " A a = new A();",
+ " a",
+ " ..foo = 1",
+ " ..test = 2;",
+ "}"),
+ "test = 2;",
+ Field.class,
+ "test;",
+ 4);
+ }
+
public void test_Function_getter_topLevel() throws Exception {
testElementLocator(
formatLines(
@@ -542,6 +563,26 @@ public class DartElementLocatorTest extends TestCase {
4);
}
+ public void test_Method_onCascade() throws Exception {
+ testElementLocator(
+ formatLines(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "process(x) {}",
+ "class A {",
+ " foo() {}",
+ " test() {}",
+ "}",
+ "main() {",
+ " A a = new A();",
+ " a..foo()..test();",
+ "}",
+ ""),
+ "test();",
+ Method.class,
+ "test() {}",
+ 4);
+ }
+
public void test_Method_onDeclaration() throws Exception {
testElementLocator(
formatLines(
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698