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

Unified Diff: pkg/dev_compiler/test/codegen_test.dart

Issue 2744853002: Fix expectations (Closed)
Patch Set: Rebase Created 3 years, 9 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/dev_compiler/test/browser/language_tests.js ('k') | pkg/dev_compiler/test/not_yet_strong_tests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/test/codegen_test.dart
diff --git a/pkg/dev_compiler/test/codegen_test.dart b/pkg/dev_compiler/test/codegen_test.dart
index def1fd606b8b1b0eeb0ff7588a739ed01296af6a..ef89c6db85a8c1539e76d82ba155075003528679 100644
--- a/pkg/dev_compiler/test/codegen_test.dart
+++ b/pkg/dev_compiler/test/codegen_test.dart
@@ -164,6 +164,8 @@ main(List<String> arguments) {
trace = t;
}
+ bool expectedCompileTimeError =
+ contents.contains(': compile-time error\n');
bool notStrong = notYetStrongTests.contains(name);
bool crashing = _crashingTests.contains(name);
@@ -179,12 +181,17 @@ main(List<String> arguments) {
module);
expect(crashing, isFalse, reason: "test $name no longer crashes.");
+ // TODO(vsm): We don't seem to trip on non-strong errors?
+ // expect(expectedCompileTimeError, isFalse,
+ // reason: "test $name expected compilation errors, but compiled.");
expect(notStrong, isFalse,
reason: "test $name expected strong mode errors, but compiled.");
} else {
expect(crashing, isFalse, reason: "test $name no longer crashes.");
- expect(notStrong, isTrue,
- reason: "test $name failed to compile due to strong mode errors:"
+ var reason =
+ expectedCompileTimeError ? "expected" : "untriaged strong mode";
+ expect(expectedCompileTimeError || notStrong, isTrue,
+ reason: "test $name failed to compile due to $reason errors:"
"\n\n${module.errors.join('\n')}.");
}
});
@@ -379,6 +386,11 @@ String _resolveDirective(UriBasedDirective directive) {
}
final _crashingTests = new Set<String>.from([
+ 'language/generic_methods_generic_class_tearoff_test',
+ 'language/generic_methods_named_parameters_test',
+ 'language/generic_methods_optional_parameters_test',
+ 'language/generic_methods_tearoff_specialization_test',
+ 'language/generic_methods_unused_parameter_test',
'language/mixin_illegal_syntax_test_none_multi',
'language/mixin_illegal_syntax_test_01_multi',
'language/mixin_illegal_syntax_test_02_multi',
« no previous file with comments | « pkg/dev_compiler/test/browser/language_tests.js ('k') | pkg/dev_compiler/test/not_yet_strong_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698