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

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

Issue 10661022: Issue 3752. Support for @override annotations (as structured doc comments) (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
Index: compiler/javatests/com/google/dart/compiler/parser/LibraryParserTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/parser/LibraryParserTest.java b/compiler/javatests/com/google/dart/compiler/parser/LibraryParserTest.java
index a8a60d79be8771213312928d3a6b67d0fd30ab3a..1fd2af659ed1c0fb00dd5a3b2fe6078f426142d3 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/LibraryParserTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/LibraryParserTest.java
@@ -4,6 +4,7 @@
package com.google.dart.compiler.parser;
+import com.google.common.collect.Sets;
import com.google.dart.compiler.DartCompilerListenerTest;
import com.google.dart.compiler.DartSource;
import com.google.dart.compiler.LibrarySource;
@@ -12,7 +13,6 @@ import com.google.dart.compiler.ast.LibraryUnit;
import junit.framework.TestCase;
-import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.net.URI;
@@ -183,13 +183,14 @@ public class LibraryParserTest extends TestCase {
private LibraryUnit parse(String text, Object... errors) {
TestLibrarySource source = new TestLibrarySource(text);
DartCompilerListenerTest listener = new DartCompilerListenerTest(source.getName(), errors);
- try {
- LibraryUnit unit =
- DartParser.getSourceParser(source, listener).preProcessLibraryDirectives(source);
- listener.checkAllErrorsReported();
- return unit;
- } catch (IOException ioEx) {
- throw new AssertionError(ioEx);
- }
+ LibraryUnit unit = new DartParser(
+ source,
+ text,
+ false,
+ Sets.<String>newHashSet(),
+ listener,
+ null).preProcessLibraryDirectives(source);
+ listener.checkAllErrorsReported();
+ return unit;
}
}

Powered by Google App Engine
This is Rietveld 408576698