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

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

Issue 362243003: Generate mock libraries and assert that helpers are non-null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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: tests/compiler/dart2js/resolver_test.dart
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index 3107d36f66d554c0eabd7db7079e660677c183d2..de61a56ac3a12b22fb0637b319ae7d0a3fbbdb7c 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -675,7 +675,7 @@ Future resolveConstructor(
{List expectedWarnings: const [],
List expectedErrors: const [],
List expectedInfos: const [],
- String corelib: DEFAULT_CORELIB}) {
+ Map corelib}) {
MockCompiler compiler = new MockCompiler.internal(coreSource: corelib);
return compiler.init().then((_) {
compiler.parseScript(script);
@@ -911,28 +911,13 @@ Future testInitializers() {
},
() {
String script = "";
- final String CORELIB_WITH_INVALID_OBJECT =
- '''print(var obj) {}
- class int {}
- class double {}
- class bool {}
- class String {}
- class num {}
- class Function {}
- class List<E> {}
- class Map {}
- class Closure {}
- class Null {}
- class StackTrace {}
- class Dynamic_ {}
- class Type {}
- class Object { Object() : super(); }
- const proxy = 0;''';
+ final INVALID_OBJECT =
+ const { 'Object': 'class Object { Object() : super(); }' };
return resolveConstructor(script,
"Object o = new Object();", "Object", "", 1,
expectedWarnings: [],
expectedErrors: [MessageKind.SUPER_INITIALIZER_IN_OBJECT],
- corelib: CORELIB_WITH_INVALID_OBJECT);
+ corelib: INVALID_OBJECT);
},
], (f) => f());
}

Powered by Google App Engine
This is Rietveld 408576698