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

Unified Diff: pkg/front_end/test/kernel_generator_test.dart

Issue 2982093003: Unifying compiler context (Closed)
Patch Set: revert change to kernel-service.dart 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
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 1e773fbdbbe4113c51181b896d2206b332325664..9f477e0ee51bf296551b8a5077ade12d54c7e7b4 100644
--- a/pkg/front_end/test/kernel_generator_test.dart
+++ b/pkg/front_end/test/kernel_generator_test.dart
@@ -4,6 +4,8 @@
import 'package:front_end/front_end.dart';
import 'package:front_end/src/fasta/kernel/utils.dart';
+import 'package:front_end/src/fasta/deprecated_problems.dart'
+ show deprecated_InputError;
import 'package:front_end/src/testing/compiler_common.dart';
import 'package:kernel/ast.dart';
@@ -61,13 +63,14 @@ main() {
expect(errors.first.message, contains("No 'main' method found"));
});
- test('default error handler throws', () async {
+ test('default error handler throws on errors', () async {
+ var options = new CompilerOptions();
var exceptionThrown = false;
try {
- await compileScript('a() => print("hi");');
- } on CompilationError catch (e) {
+ await compileScript('a() => print("hi");', options: options);
+ } on deprecated_InputError catch (e) {
exceptionThrown = true;
- expect(e.message, contains("No 'main' method found"));
+ expect('${e.error}', contains("Compilation aborted"));
}
expect(exceptionThrown, isTrue);
});

Powered by Google App Engine
This is Rietveld 408576698