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

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

Issue 2980273002: Random improvements in error reporting. (Closed)
Patch Set: rebased 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
« no previous file with comments | « pkg/front_end/messages.yaml ('k') | pkg/front_end/tool/_fasta/generate_messages.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9f477e0ee51bf296551b8a5077ade12d54c7e7b4..6620a094bf3f53029aed232d06b247cb2229aae5 100644
--- a/pkg/front_end/test/kernel_generator_test.dart
+++ b/pkg/front_end/test/kernel_generator_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/front_end.dart';
+import 'package:front_end/src/fasta/fasta_codes.dart';
import 'package:front_end/src/fasta/kernel/utils.dart';
import 'package:front_end/src/fasta/deprecated_problems.dart'
show deprecated_InputError;
@@ -58,9 +59,7 @@ main() {
var errors = [];
var options = new CompilerOptions()..onError = (e) => errors.add(e);
await compileScript('a() => print("hi");', options: options);
- // TODO(sigmund): when we expose codes in the public APIs, we should
- // compare the code here and not the message.
- expect(errors.first.message, contains("No 'main' method found"));
+ expect(errors.first.message, messageMissingMain.message);
});
test('default error handler throws on errors', () async {
« no previous file with comments | « pkg/front_end/messages.yaml ('k') | pkg/front_end/tool/_fasta/generate_messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698