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

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

Issue 10825346: Fix bugs in parser and update tests to use new directive syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
===================================================================
--- compiler/javatests/com/google/dart/compiler/parser/LibraryParserTest.java (revision 10652)
+++ compiler/javatests/com/google/dart/compiler/parser/LibraryParserTest.java (working copy)
@@ -78,11 +78,11 @@
public void testLibrary() {
// "library { import = ['foo.lib', 'bar.lib'] source = ['this.dart', 'that.dart'] }";
String text =
- "#library(\"testLibrary\");\n"
- + "#import(\"foo.dart\");\n"
- + "#import(\"bar.dart\");\n"
- + "#source(\"this.dart\");\n"
- + "#source(\"that.dart\");\n";
+ "library testLibrary;\n"
+ + "import \"foo.dart\";\n"
+ + "import \"bar.dart\";\n"
+ + "part \"this.dart\";\n"
+ + "part \"that.dart\";\n";
LibraryUnit unit = parse(text);
@@ -95,9 +95,9 @@
public void testNative() {
// "library { import = ['foo.lib'] source = ['this.dart'] native = ['impl.js'] }";
String text =
- "#library(\"testLibrary\");\n"
- + "#import(\"foo.dart\");\n"
- + "#source(\"this.dart\");\n"
+ "library testLibrary;\n"
+ + "import \"foo.dart\";\n"
+ + "part \"this.dart\";\n"
+ "#native(\"impl.js\");\n";
LibraryUnit unit = parse(text);
@@ -110,10 +110,10 @@
public void testImportPrefix() {
// "library { import = [foo:'foo.lib', 'bar.lib'] source = ['this.dart', 'that.dart'] }";
String text =
- "#library(\"testLibrary\");\n"
- + "#import(\"foo.dart\", prefix:\"foo\");\n"
- + "#import(\"bar.dart\");\n"
- + "#source(\"this.dart\");\n"
+ "library testLibrary;\n"
+ + "import \"foo.dart\" as foo;\n"
+ + "import \"bar.dart\";\n"
+ + "part \"this.dart\";\n"
+ "#native(\"impl.js\");\n";
LibraryUnit unit = parse(text);

Powered by Google App Engine
This is Rietveld 408576698