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

Unified Diff: tests/compiler/dart2js/type_test_helper.dart

Issue 88153003: Add synthetic type variables to unnamed mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years 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: tests/compiler/dart2js/type_test_helper.dart
diff --git a/tests/compiler/dart2js/type_test_helper.dart b/tests/compiler/dart2js/type_test_helper.dart
index d6168355375e84a827c207afba9b4f7a69eb7f1a..01e8c16fad5869ffd0075d015e758555509aa74a 100644
--- a/tests/compiler/dart2js/type_test_helper.dart
+++ b/tests/compiler/dart2js/type_test_helper.dart
@@ -22,7 +22,9 @@ GenericType instantiate(TypeDeclarationElement element,
class TypeEnvironment {
final MockCompiler compiler;
- static Future<TypeEnvironment> create(String source) {
+ static Future<TypeEnvironment> create(
+ String source, {bool expectNoErrors: false,
+ bool expectNoWarningsOrErrors: false}) {
var uri = new Uri(scheme: 'source');
MockCompiler compiler = compilerFor('''
main() {}
@@ -31,6 +33,14 @@ class TypeEnvironment {
analyzeAll: true,
analyzeOnly: true);
return compiler.runCompiler(uri).then((_) {
+ if (expectNoErrors || expectNoWarningsOrErrors) {
+ Expect.isTrue(compiler.errors.isEmpty,
+ 'Unexpected errors: ${compiler.errors}');
+ }
+ if (expectNoWarningsOrErrors) {
+ Expect.isTrue(compiler.warnings.isEmpty,
+ 'Unexpected warnings: ${compiler.warnings}');
+ }
return new TypeEnvironment._(compiler);
});
}

Powered by Google App Engine
This is Rietveld 408576698