| 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 80197a200e260e89637d9b535ef7ade8f53e37c4..ee884f2d72c5b35e66cdd84f1a09b709622f3a93 100644
|
| --- a/pkg/front_end/test/incremental_kernel_generator_test.dart
|
| +++ b/pkg/front_end/test/incremental_kernel_generator_test.dart
|
| @@ -57,7 +57,13 @@ main() {
|
| }
|
| ''');
|
|
|
| - String initialText = r'''
|
| + // Compute the initial state
|
| + {
|
| + Program program = await getInitialState(uri);
|
| + Library library = _getLibrary(program, uri);
|
| + expect(
|
| + _getLibraryText(library),
|
| + r'''
|
| library;
|
| import self as self;
|
| import "dart:core" as core;
|
| @@ -65,13 +71,7 @@ import "dart:core" as core;
|
| static method main() → dynamic {
|
| core::int v = 1;
|
| }
|
| -''';
|
| -
|
| - // Compute the initial state.
|
| - {
|
| - Program program = await getInitialState(uri);
|
| - Library library = _getLibrary(program, uri);
|
| - expect(_getLibraryText(library), initialText);
|
| +''');
|
| }
|
|
|
| // Update the entry point library.
|
| @@ -83,19 +83,11 @@ main() {
|
| }
|
| ''');
|
|
|
| - // Because we have not invalidated the file, we get the same library.
|
| - // TODO(scheglov) Eventually we should get an empty Program.
|
| - {
|
| - DeltaProgram delta = await incrementalKernelGenerator.computeDelta();
|
| - Library library = _getLibrary(delta.newProgram, uri);
|
| - expect(_getLibraryText(library), initialText);
|
| - }
|
| -
|
| - // Invalidate the file, so get the new text.
|
| - incrementalKernelGenerator.invalidate(uri);
|
| + // The delta has the updated entry point library.
|
| {
|
| DeltaProgram delta = await incrementalKernelGenerator.computeDelta();
|
| - Library library = _getLibrary(delta.newProgram, uri);
|
| + Program program = delta.newProgram;
|
| + Library library = _getLibrary(program, uri);
|
| expect(
|
| _getLibraryText(library),
|
| r'''
|
|
|