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

Unified Diff: pkg/front_end/test/src/incremental/kernel_driver_test.dart

Issue 2991873002: Store dependency libraries canonical names during limited store. (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | pkg/kernel/lib/binary/limited_ast_to_binary.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/src/incremental/kernel_driver_test.dart
diff --git a/pkg/front_end/test/src/incremental/kernel_driver_test.dart b/pkg/front_end/test/src/incremental/kernel_driver_test.dart
index 135b82b571ae49fb574edda146de6898599b87ad..9fc111bc901ec8ef8259afa2ad8573e183194307 100644
--- a/pkg/front_end/test/src/incremental/kernel_driver_test.dart
+++ b/pkg/front_end/test/src/incremental/kernel_driver_test.dart
@@ -406,6 +406,43 @@ main() {
verifyProgram(program);
}
+ test_limitedStore_exportDependencies() async {
+ writeFile('/test/.packages', 'test:lib/');
+ String aPath = '/test/lib/a.dart';
+ String bPath = '/test/lib/b.dart';
+ String cPath = '/test/lib/c.dart';
+ Uri aUri = writeFile(aPath, 'class A {}');
+ var bUri = writeFile(bPath, 'export "a.dart";');
+ Uri cUri = writeFile(cPath, r'''
+import 'b.dart';
+A a;
+''');
+
+ // Compile all libraries initially.
+ await driver.getKernel(cUri);
+
+ // Update c.dart and compile.
+ // When we load "b", we should correctly read its exports.
+ writeFile(cPath, r'''
+import 'b.dart';
+A a2;
+''');
+ driver.invalidate(cUri);
+ {
+ KernelResult result = await driver.getKernel(cUri);
+ Library library = _getLibrary(result, cUri);
+
+ Library getDepLib(Library lib, int index) {
+ return lib.dependencies[index].importedLibraryReference.asLibrary;
+ }
+
+ var b = getDepLib(library, 0);
+ var a = getDepLib(b, 0);
+ expect(b.importUri, bUri);
+ expect(a.importUri, aUri);
+ }
+ }
+
test_updatePackageSourceUsingFileUri() async {
_createDriver(packages: {'test': _folderUri('/test/lib')});
« no previous file with comments | « no previous file | pkg/kernel/lib/binary/limited_ast_to_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698