Chromium Code Reviews| 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 8b4aaae5ad6b6f798fea6326c0d83859a63910aa..f61b356b06fbd9c5a470125291037b90bd23b7c4 100644 |
| --- a/pkg/front_end/test/incremental_kernel_generator_test.dart |
| +++ b/pkg/front_end/test/incremental_kernel_generator_test.dart |
| @@ -60,7 +60,7 @@ class IncrementalKernelGeneratorTest { |
| test_acceptLastDelta() async { |
| writeFile('/test/.packages', 'test:lib/'); |
| String path = '/test/lib/test.dart'; |
| - Uri uri = writeFile(path, 'var v = 1;'); |
| + Uri uri = writeFile(path, ''); |
| await getInitialState(uri); |
| incrementalKernelGenerator.acceptLastDelta(); |
| @@ -223,6 +223,24 @@ static field asy::Future<core::String> b; |
| '''); |
| } |
| + test_computeDelta_hasAnotherRunning() async { |
| + writeFile('/test/.packages', 'test:lib/'); |
| + String path = '/test/lib/test.dart'; |
| + Uri uri = writeFile(path, ''); |
| + |
| + await getInitialState(uri); |
| + incrementalKernelGenerator.acceptLastDelta(); |
| + |
| + // Run, but don't wait. |
| + incrementalKernelGenerator.computeDelta(); |
|
Siggi Cherem (dart-lang)
2017/08/10 22:43:29
we might want to store the future returned by this
scheglov
2017/08/10 23:46:49
Done.
|
| + |
| + // Run another, this causes StateError. |
| + try { |
| + await incrementalKernelGenerator.computeDelta(); |
|
Siggi Cherem (dart-lang)
2017/08/10 22:43:29
Could this be flaky?
In particular, is it at all
scheglov
2017/08/10 23:46:49
I changed computeDelta() to check _isComputeDeltaE
|
| + fail('StateError expected.'); |
| + } on StateError {} |
|
Siggi Cherem (dart-lang)
2017/08/10 22:43:29
there are two reasons why computeDelta could throw
scheglov
2017/08/10 23:46:50
Well, there is no great way to do this.
I had to u
|
| + } |
| + |
| test_inferPackagesFile() async { |
| writeFile('/test/.packages', 'test:lib/'); |
| String aPath = '/test/lib/a.dart'; |