OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library mock_compiler; | 5 library mock_compiler; |
6 | 6 |
7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; | 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 remainder(other) => (this is JSInt) ? 42 : 42.0; | 147 remainder(other) => (this is JSInt) ? 42 : 42.0; |
148 truncate() => 42; | 148 truncate() => 42; |
149 } | 149 } |
150 class JSInt extends JSNumber implements int { | 150 class JSInt extends JSNumber implements int { |
151 } | 151 } |
152 class JSDouble extends JSNumber implements double { | 152 class JSDouble extends JSNumber implements double { |
153 } | 153 } |
154 class JSNull extends Interceptor { | 154 class JSNull extends Interceptor { |
155 bool operator==(other) => identical(null, other); | 155 bool operator==(other) => identical(null, other); |
156 get hashCode => throw "JSNull.hashCode not implemented."; | 156 get hashCode => throw "JSNull.hashCode not implemented."; |
| 157 String toString() => 'Null'; |
| 158 Type get runtimeType => null; |
157 } | 159 } |
158 class JSBool extends Interceptor implements bool { | 160 class JSBool extends Interceptor implements bool { |
159 } | 161 } |
160 class JSFunction extends Interceptor implements Function { | 162 class JSFunction extends Interceptor implements Function { |
161 } | 163 } |
162 class ObjectInterceptor { | 164 class ObjectInterceptor { |
163 } | 165 } |
164 getInterceptor(x) {} | 166 getInterceptor(x) {} |
165 getNativeInterceptor(x) {} | 167 getNativeInterceptor(x) {} |
166 var dispatchPropertyName; | 168 var dispatchPropertyName; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 } | 458 } |
457 } | 459 } |
458 | 460 |
459 class MockDeferredLoadTask extends DeferredLoadTask { | 461 class MockDeferredLoadTask extends DeferredLoadTask { |
460 MockDeferredLoadTask(Compiler compiler) : super(compiler); | 462 MockDeferredLoadTask(Compiler compiler) : super(compiler); |
461 | 463 |
462 void registerMainApp(LibraryElement mainApp) { | 464 void registerMainApp(LibraryElement mainApp) { |
463 // Do nothing. | 465 // Do nothing. |
464 } | 466 } |
465 } | 467 } |
OLD | NEW |