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

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

Issue 10990074: Fix for NPE with StringLiteral in toString() (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/java/com/google/dart/compiler/ast/DartToSourceVisitor.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1478abaeaf37d08be71082fd2e01fc0d362e8374..2bc7035e715305843a0bd8caa7bb1758950185e3 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
@@ -20,6 +20,7 @@ import com.google.dart.compiler.ast.DartField;
import com.google.dart.compiler.ast.DartFieldDefinition;
import com.google.dart.compiler.ast.DartFunctionExpression;
import com.google.dart.compiler.ast.DartIdentifier;
+import com.google.dart.compiler.ast.DartImportDirective;
import com.google.dart.compiler.ast.DartIntegerLiteral;
import com.google.dart.compiler.ast.DartMapLiteral;
import com.google.dart.compiler.ast.DartMethodDefinition;
@@ -52,6 +53,15 @@ public class SyntaxTest extends AbstractParserTest {
"export 'a.dart';"));
}
+ public void test_importDirective_noUri() {
+ DartUnit unit = parseUnit("test.dart", Joiner.on("\n").join(
+ "library lib;",
+ "import;"),
+ ParserErrorCode.EXPECTED_TOKEN, 2, 7);
+ DartImportDirective dir = (DartImportDirective) unit.getDirectives().get(1);
+ System.out.println(dir.toSource());
+ }
+
public void test_getter() {
parseUnit("getter.dart", Joiner.on("\n").join(
"class G {",
« no previous file with comments | « compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698