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

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

Issue 9651004: Make SourceInfo a class, rename its menthods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for formatting, lazily create LainesInfo Created 8 years, 9 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/CPParserTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/parser/CPParserTest.java b/compiler/javatests/com/google/dart/compiler/parser/CPParserTest.java
index ad5afa71107f709f3ad8f5b58d7162f28cd628e5..4b09e7885549d206c466cbb1ba92a9e947d4f6fa 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/CPParserTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/CPParserTest.java
@@ -9,6 +9,7 @@ import com.google.dart.compiler.DartCompilerListener;
import com.google.dart.compiler.Source;
import com.google.dart.compiler.ast.DartComment;
import com.google.dart.compiler.ast.DartUnit;
+import com.google.dart.compiler.common.SourceInfo;
import java.util.ArrayList;
import java.util.List;
@@ -55,7 +56,9 @@ public class CPParserTest extends CompilerTestCase {
private List<String> extractComments(List<DartComment> cms) {
List<String> comments = new ArrayList<String>();
for (DartComment cm : cms) {
- comments.add(source.substring(cm.getSourceStart(), cm.getSourceStart()+cm.getSourceLength()));
+ SourceInfo sourceInfo = cm.getSourceInfo();
+ comments.add(source.substring(sourceInfo.getOffset(), sourceInfo.getOffset()
+ + sourceInfo.getLength()));
}
return comments;
}

Powered by Google App Engine
This is Rietveld 408576698