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

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

Issue 2882893002: Store Typedef(s) in kernel when parsing with Fasta, deserilize in DillLibraryBuilder. (Closed)
Patch Set: Add the new file. 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 658bc2abce301ad3023c6087366290d0b6e6b07a..ca97c3ebdeb03c8624b757499ad939668f736a58 100644
--- a/pkg/front_end/test/incremental_kernel_generator_test.dart
+++ b/pkg/front_end/test/incremental_kernel_generator_test.dart
@@ -184,6 +184,31 @@ 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