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 044a52e99f6ca7832649642ab4a231dd9bd58d76..6bac963bb5c695213e299f8635216a3f668b84b9 100644 |
--- a/pkg/front_end/test/incremental_kernel_generator_test.dart |
+++ b/pkg/front_end/test/incremental_kernel_generator_test.dart |
@@ -663,6 +663,26 @@ static method main() → void {} |
} |
} |
+ test_invalidateAll() async { |
+ writeFile('/test/.packages', ''); |
+ Uri aUri = writeFile('/test/a.dart', "import 'b.dart';\nint a = b;"); |
+ Uri bUri = writeFile('/test/b.dart', 'var b = 1;'); |
+ |
+ Program program = await getInitialState(aUri); |
+ expect(_getLibraryText(_getLibrary(program, aUri)), contains("int a =")); |
Siggi Cherem (dart-lang)
2017/06/07 20:17:11
Let me know if you prefer that I check the full te
scheglov
2017/06/07 20:26:32
Verifying only relevant parts is perfectly fine.
Siggi Cherem (dart-lang)
2017/06/07 20:51:09
I have highlighting too :) - the problem is that I
|
+ expect(_getLibraryText(_getLibrary(program, bUri)), contains("b = 1")); |
+ |
+ writeFile('/test/a.dart', "import 'b.dart';\ndouble a = b;"); |
+ writeFile('/test/b.dart', 'var b = 2;'); |
+ incrementalKernelGenerator.invalidateAll(); |
+ |
+ DeltaProgram delta = await incrementalKernelGenerator.computeDelta(); |
+ program = delta.newProgram; |
+ _assertLibraryUris(program, includes: [aUri, bUri]); |
+ expect(_getLibraryText(_getLibrary(program, aUri)), contains("double a =")); |
+ expect(_getLibraryText(_getLibrary(program, bUri)), contains("b = 2")); |
+ } |
+ |
/// Write the given [text] of the file with the given [path] into the |
/// virtual filesystem. Return the URI of the file. |
Uri writeFile(String path, String text) { |