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

Unified Diff: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java

Issue 11029037: Fix for cascade sections SourceInfo (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: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
index 9fc8bfe01ff7dc49001df495203ba83d5ddb0c5e..bf007e6cb0342f67554db38a3672115889469143 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
@@ -110,11 +110,17 @@ public class SyntaxTest extends AbstractParserTest {
}
public void test_cascade() {
- parseUnit("cascade.dart", Joiner.on("\n").join(
- "class C {",
- " var f = g..m1()..m2()..f.a;",
- " var f = g..[3].x()..y()();",
- "}"));
+ parseUnit(
+ "cascade.dart",
+ Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class C {",
+ " var f = g..m1()..m2()..f.a;",
+ " var f = g..[3].x()..y()();",
+ "}"));
+ // test that cascaded invocations have reasonable SourceInfo
+ assertNodeSourceInfo("..m1()");
+ assertNodeSourceInfo("..m2()");
}
// public void test_cascade2() {

Powered by Google App Engine
This is Rietveld 408576698