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

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: Fix after rebase. 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
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/size_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/resolver_test.dart
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index 0bd931a423d0a0574aa881e7570225d5fd85ca3a..2b977639548d8d8ded8c17a7db44265b6f87639e 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -679,7 +679,7 @@ Future resolveConstructor(
{List expectedWarnings: const [],
List expectedErrors: const [],
List expectedInfos: const [],
- String corelib: DEFAULT_CORELIB}) {
+ Map<String, String> corelib}) {
MockCompiler compiler = new MockCompiler.internal(coreSource: corelib);
return compiler.init().then((_) {
compiler.parseScript(script);
@@ -915,28 +915,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());
}
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/size_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698