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

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

Issue 12380058: Remove HBoundedPotentialPrimitiveArray type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 47620daf543df321678e28dd9a1473559ff9a8da..292cb3fc2ee47b306ba732f12d30ff4f208ea8f9 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -63,18 +63,18 @@ const String DEFAULT_HELPERLIB = r'''
throwAbstractClassInstantiationError(className) {}''';
const String DEFAULT_INTERCEPTORSLIB = r'''
- class JSArray {
+ class JSArray implements List {
var length;
operator[](index) {}
operator[]=(index, value) {}
var add;
}
- class JSString {
+ class JSString implements String {
var length;
operator[](index) {}
toString() {}
}
- class JSNumber {
+ class JSNumber implements num {
// All these methods return a number to please type inferencing.
operator-() => (this is JSInt) ? 42 : 42.0;
operator +(other) => (this is JSInt) ? 42 : 42.0;
@@ -95,15 +95,15 @@ const String DEFAULT_INTERCEPTORSLIB = r'''
operator <=(other) => true;
operator ==(other) => true;
}
- class JSInt extends JSNumber {
+ class JSInt extends JSNumber implements int {
}
- class JSDouble extends JSNumber {
+ class JSDouble extends JSNumber implements double {
}
class JSNull {
}
- class JSBool {
+ class JSBool implements bool {
}
- class JSFunction {
+ class JSFunction implements Function {
}
class ObjectInterceptor {
}
@@ -162,12 +162,16 @@ class MockCompiler extends Compiler {
// We need to set the assert method to avoid calls with a 'null'
// target being interpreted as a call to assert.
jsHelperLibrary = createLibrary("helper", helperSource);
+ interceptorsLibrary = createLibrary("interceptors", interceptorsSource);
+ isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource);
+
+ // Set up the library imports.
importHelperLibrary(coreLibrary);
libraryLoader.importLibrary(jsHelperLibrary, coreLibrary, null);
+ libraryLoader.importLibrary(interceptorsLibrary, coreLibrary, null);
+ libraryLoader.importLibrary(isolateHelperLibrary, coreLibrary, null);
assertMethod = jsHelperLibrary.find(buildSourceString('assert'));
- interceptorsLibrary = createLibrary("interceptors", interceptorsSource);
- isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource);
mainApp = mockLibrary(this, "");
initializeSpecialClasses();
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/type_mask.dart ('k') | tests/compiler/dart2js/type_combination_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698