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

Unified Diff: pkg/front_end/test/incremental_kernel_generator_test.dart

Issue 2886563002: Compute export namespaces for DILL libraries. (Closed)
Patch Set: Created 3 years, 7 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: pkg/front_end/test/incremental_kernel_generator_test.dart
diff --git a/pkg/front_end/test/incremental_kernel_generator_test.dart b/pkg/front_end/test/incremental_kernel_generator_test.dart
index ca97c3ebdeb03c8624b757499ad939668f736a58..f2ba0fe646501d040d6c8100e086c68cba382015 100644
--- a/pkg/front_end/test/incremental_kernel_generator_test.dart
+++ b/pkg/front_end/test/incremental_kernel_generator_test.dart
@@ -120,6 +120,58 @@ static field core::double c2 = b::b;
}
}
+ test_compile_export() async {
+ writeFile('/test/.packages', 'test:lib/');
+ String aPath = '/test/lib/a.dart';
+ String bPath = '/test/lib/b.dart';
+ String cPath = '/test/lib/c.dart';
+ writeFile(aPath, 'class A {}');
+ writeFile(bPath, 'export "a.dart";');
+ Uri cUri = writeFile(
+ cPath,
+ r'''
+import 'b.dart';
+A a;
+''');
+
+ Program program = await getInitialState(cUri);
+ Library library = _getLibrary(program, cUri);
+ expect(
+ _getLibraryText(library),
+ r'''
+library;
+import self as self;
+import "./a.dart" as a;
+
+static field a::A a;
+''');
+ }
+
+ test_compile_typedef() async {
+ writeFile('/test/.packages', 'test:lib/');
+ String aPath = '/test/lib/a.dart';
+ String bPath = '/test/lib/b.dart';
+ writeFile(aPath, 'typedef int F<T>(T x);');
+ Uri bUri = writeFile(
+ bPath,
+ r'''
+import 'a.dart';
+F<String> f;
+''');
+
+ Program program = await getInitialState(bUri);
+ Library library = _getLibrary(program, bUri);
+ expect(
+ _getLibraryText(library),
+ r'''
+library;
+import self as self;
+import "dart:core" as core;
+
+static field (core::String) → core::int f;
+''');
+ }
+
test_updateEntryPoint() async {
writeFile('/test/.packages', 'test:lib/');
String path = '/test/lib/test.dart';
@@ -184,31 +236,6 @@ static method main() → dynamic {
}
}
- test_compile_typedef() async {
- writeFile('/test/.packages', 'test:lib/');
- String aPath = '/test/lib/a.dart';
- String bPath = '/test/lib/b.dart';
- writeFile(aPath, 'typedef int F<T>(T x);');
- Uri bUri = writeFile(
- bPath,
- r'''
-import 'a.dart';
-F<String> f;
-''');
-
- Program program = await getInitialState(bUri);
- Library library = _getLibrary(program, bUri);
- expect(
- _getLibraryText(library),
- r'''
-library;
-import self as self;
-import "dart:core" as core;
-
-static field (core::String) → core::int f;
-''');
- }
-
test_updatePart() async {
writeFile('/test/.packages', 'test:lib/');
String libPath = '/test/lib/test.dart';

Powered by Google App Engine
This is Rietveld 408576698