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(); |