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

Unified Diff: compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java

Issue 11226010: Issue 6073. Fixes for 'export'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/end2end/inc/IncrementalCompilation2Test.java
diff --git a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
index 8f586e5bb3c488b911aff89fe0ba86039cc40daa..9cecfea2d4bd7db4306ee7514621534f648f3928 100644
--- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
+++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
@@ -1123,6 +1123,115 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
assertTrue(errors.toString().contains("libB.TypeBB"));
}
+ public void test_newLibrarySyntax_export2() throws Exception {
+ appSource.setContent(
+ "A.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library libA;",
+ "class SourceString {}",
+ ""));
+ appSource.setContent(
+ "B.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library libB;",
+ "import 'C.dart';",
+ "export 'A.dart' show SourceString;",
+ ""));
+ appSource.setContent(
+ "C.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library libC;",
+ "import 'B.dart';",
+ "foo() {",
+ " SourceString s;",
+ "}",
+ ""));
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library app;",
+ "import 'B.dart';",
+ ""));
+ compile();
+ assertErrors(errors);
+ }
+
+ public void test_newLibrarySyntax_export3() throws Exception {
+ appSource.setContent(
+ "A.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library libA;",
+ "class SourceString {}",
+ ""));
+ appSource.setContent(
+ "B.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library libB;",
+ "export 'C.dart';",
+ "export 'A.dart' show SourceString;",
+ ""));
+ appSource.setContent(
+ "C.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library libC;",
+ "import 'B.dart';",
+ "foo() {",
+ " SourceString s;",
+ "}",
+ ""));
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library app;",
+ "import 'B.dart';",
+ ""));
+ compile();
+ assertErrors(errors);
+ }
+
+ public void test_newLibrarySyntax_export4() throws Exception {
+ appSource.setContent(
+ "p1.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library lib1;",
+ "export 'p3.dart';",
+ ""));
+ appSource.setContent(
+ "p2.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library lib2;",
+ "export 'p3.dart';",
+ ""));
+ appSource.setContent(
+ "p3.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library lib3;",
+ "class MyClass {}",
+ ""));
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library app;",
+ "import 'p1.dart' hide MyClass;",
+ "import 'p2.dart';",
+ "MyClass topLevelField;",
+ ""));
+ compile();
+ assertErrors(errors);
+ }
+
public void test_newLibrarySyntax_export_hide() throws Exception {
appSource.setContent(
"A.dart",

Powered by Google App Engine
This is Rietveld 408576698