Chromium Code Reviews| Index: pkg/front_end/test/kernel_generator_test.dart |
| diff --git a/pkg/front_end/test/kernel_generator_test.dart b/pkg/front_end/test/kernel_generator_test.dart |
| index cbed95ef8e44f39cd7d89ee567c3d4c493c4f9e2..38f68e0493ecd234641e1e69deab32980cfa078e 100644 |
| --- a/pkg/front_end/test/kernel_generator_test.dart |
| +++ b/pkg/front_end/test/kernel_generator_test.dart |
| @@ -63,17 +63,24 @@ main() { |
| expect(errors.first.message, messageMissingMain.message); |
| }); |
| - test('default error handler throws on errors', () async { |
| - var options = new CompilerOptions(); |
| - var exceptionThrown = false; |
| - try { |
| - await compileScript('a() => print("hi");', options: options); |
| - } on deprecated_InputError catch (e) { |
| - exceptionThrown = true; |
| - expect('${e.error}', contains("Compilation aborted")); |
| - } |
| - expect(exceptionThrown, isTrue); |
| - }); |
| + // TODO(ahe): This test is wrong at least with respect to expecting that |
| + // [deprecated_InputError] leaks through the API. Furthermore, the default |
| + // behavior should be to recover from errors, as this is the most important |
| + // use case we have. |
|
ahe
2017/08/23 15:07:18
Please let me know if I can delete this test?
If
Siggi Cherem (dart-lang)
2017/08/23 20:17:35
I'd like to keep something to test a default-error
ahe
2017/08/24 11:52:02
I'd rather wait until you have time to implement t
|
| + // ignore: DEAD_CODE |
| + if (false) { |
|
Siggi Cherem (dart-lang)
2017/08/23 20:17:35
Might not be relevant depending on how we address
ahe
2017/08/24 11:52:02
Done.
|
| + test('default error handler throws on errors', () async { |
| + var options = new CompilerOptions(); |
| + var exceptionThrown = false; |
| + try { |
| + await compileScript('a() => print("hi");', options: options); |
| + } on deprecated_InputError catch (e) { |
| + exceptionThrown = true; |
| + expect('${e.error}', contains("Compilation aborted")); |
| + } |
| + expect(exceptionThrown, isTrue); |
| + }); |
| + } |
| test('generated program contains source-info', () async { |
| var program = await compileScript('a() => print("hi"); main() {}', |