| 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:async'; | 8 import 'dart:async'; |
| 9 import 'dart:collection'; | 9 import 'dart:collection'; |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 const String DEFAULT_INTERCEPTORSLIB = r''' | 96 const String DEFAULT_INTERCEPTORSLIB = r''' |
| 97 class Interceptor { | 97 class Interceptor { |
| 98 toString() {} | 98 toString() {} |
| 99 bool operator==(other) => identical(this, other); | 99 bool operator==(other) => identical(this, other); |
| 100 get hashCode => throw "Interceptor.hashCode not implemented."; | 100 get hashCode => throw "Interceptor.hashCode not implemented."; |
| 101 noSuchMethod(im) { throw im; } | 101 noSuchMethod(im) { throw im; } |
| 102 } | 102 } |
| 103 abstract class JSIndexable { | 103 abstract class JSIndexable { |
| 104 get length; | 104 get length; |
| 105 operator[](index); |
| 105 } | 106 } |
| 106 abstract class JSMutableIndexable extends JSIndexable {} | 107 abstract class JSMutableIndexable extends JSIndexable {} |
| 107 class JSArray extends Interceptor implements List, JSIndexable { | 108 class JSArray extends Interceptor implements List, JSIndexable { |
| 108 var length; | 109 var length; |
| 109 operator[](index) => this[index]; | 110 operator[](index) => this[index]; |
| 110 operator[]=(index, value) {} | 111 operator[]=(index, value) {} |
| 111 add(value) {} | 112 add(value) {} |
| 112 removeAt(index) {} | 113 removeAt(index) {} |
| 113 insert(index, value) {} | 114 insert(index, value) {} |
| 114 removeLast() {} | 115 removeLast() {} |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 } | 469 } |
| 469 } | 470 } |
| 470 | 471 |
| 471 class MockDeferredLoadTask extends DeferredLoadTask { | 472 class MockDeferredLoadTask extends DeferredLoadTask { |
| 472 MockDeferredLoadTask(Compiler compiler) : super(compiler); | 473 MockDeferredLoadTask(Compiler compiler) : super(compiler); |
| 473 | 474 |
| 474 void registerMainApp(LibraryElement mainApp) { | 475 void registerMainApp(LibraryElement mainApp) { |
| 475 // Do nothing. | 476 // Do nothing. |
| 476 } | 477 } |
| 477 } | 478 } |
| OLD | NEW |