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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.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/resolver/ResolverTestCase.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
index 98fcb20f1ea6dbcae429acfcacd979009789c90d..b4717d170cfc0ec3536c28b6b8eb85e1f500debc 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
@@ -144,8 +144,13 @@ abstract class ResolverTestCase extends TestCase {
public Void visitIdentifier(DartIdentifier node) {
if (node.getElement() == null) {
- failures.add("Identifier: " + node.getName() + " has null element @ ("
- + node.getSourceLine() + ":" + node.getSourceColumn() + ")");
+ failures.add("Identifier: "
+ + node.getName()
+ + " has null element @ ("
+ + node.getSourceInfo().getLine()
+ + ":"
+ + node.getSourceInfo().getColumn()
+ + ")");
}
return null;
}
@@ -341,11 +346,8 @@ abstract class ResolverTestCase extends TestCase {
protected DartUnit parseUnit(String string) {
DartSourceString source = new DartSourceString("<source string>", string);
- return getParser(string).parseUnit(source);
- }
-
- private DartParser getParser(String string) {
- return new DartParser(new DartScannerParserContext(null, string, getListener()));
+ DartParser parser = new DartParser(new DartScannerParserContext(source, string, getListener()));
+ return parser.parseUnit(source);
}
private DartCompilerListener getListener() {

Powered by Google App Engine
This is Rietveld 408576698