| 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 import 'dart:uri'; | 9 import 'dart:uri'; |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 class Closure {} | 55 class Closure {} |
| 56 class Null {} | 56 class Null {} |
| 57 class Dynamic_ {} | 57 class Dynamic_ {} |
| 58 class LinkedHashMap {} | 58 class LinkedHashMap {} |
| 59 class ConstantMap {} | 59 class ConstantMap {} |
| 60 class TypeImpl {} | 60 class TypeImpl {} |
| 61 S() {} | 61 S() {} |
| 62 unwrapException(e) {} | 62 unwrapException(e) {} |
| 63 assertHelper(a){} | 63 assertHelper(a){} |
| 64 createRuntimeType(a) {} | 64 createRuntimeType(a) {} |
| 65 createInvocationMirror(a0, a1, a2, a3, a4, a5) {} |
| 65 throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {} | 66 throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {} |
| 66 throwAbstractClassInstantiationError(className) {}'''; | 67 throwAbstractClassInstantiationError(className) {}'''; |
| 67 | 68 |
| 68 const String FOREIGN_LIBRARY = r''' | 69 const String FOREIGN_LIBRARY = r''' |
| 69 dynamic JS(String typeDescription, String codeTemplate, | 70 dynamic JS(String typeDescription, String codeTemplate, |
| 70 [var arg0, var arg1, var arg2, var arg3, var arg4, var arg5, var arg6, | 71 [var arg0, var arg1, var arg2, var arg3, var arg4, var arg5, var arg6, |
| 71 var arg7, var arg8, var arg9, var arg10, var arg11]) {}'''; | 72 var arg7, var arg8, var arg9, var arg10, var arg11]) {}'''; |
| 72 | 73 |
| 73 const String DEFAULT_INTERCEPTORSLIB = r''' | 74 const String DEFAULT_INTERCEPTORSLIB = r''' |
| 74 class Interceptor { | 75 class Interceptor { |
| 75 toString() {} | 76 toString() {} |
| 76 bool operator==(other) => identical(this, other); | 77 bool operator==(other) => identical(this, other); |
| 78 noSuchMethod(im) { throw im; } |
| 77 } | 79 } |
| 78 class JSIndexable {} | 80 class JSIndexable {} |
| 79 class JSArray extends Interceptor implements List, JSIndexable { | 81 class JSArray extends Interceptor implements List, JSIndexable { |
| 80 var length; | 82 var length; |
| 81 operator[](index) {} | 83 operator[](index) {} |
| 82 operator[]=(index, value) {} | 84 operator[]=(index, value) {} |
| 83 var add; | 85 var add; |
| 84 } | 86 } |
| 85 class JSMutableArray extends JSArray {} | 87 class JSMutableArray extends JSArray {} |
| 86 class JSFixedArray extends JSMutableArray {} | 88 class JSFixedArray extends JSMutableArray {} |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 abstract class int extends num { } | 135 abstract class int extends num { } |
| 134 abstract class double extends num { | 136 abstract class double extends num { |
| 135 static var NAN = 0; | 137 static var NAN = 0; |
| 136 static parse(s) {} | 138 static parse(s) {} |
| 137 } | 139 } |
| 138 class bool {} | 140 class bool {} |
| 139 class String implements Pattern {} | 141 class String implements Pattern {} |
| 140 class Object { | 142 class Object { |
| 141 operator ==(other) {} | 143 operator ==(other) {} |
| 142 String toString() { return null; } | 144 String toString() { return null; } |
| 145 noSuchMethod(im) { throw im; } |
| 143 } | 146 } |
| 144 class Type {} | 147 class Type {} |
| 145 class Function {} | 148 class Function {} |
| 146 class List<E> {} | 149 class List<E> {} |
| 147 abstract class Map<K,V> {} | 150 abstract class Map<K,V> {} |
| 148 class DateTime { | 151 class DateTime { |
| 149 DateTime(year); | 152 DateTime(year); |
| 150 DateTime.utc(year); | 153 DateTime.utc(year); |
| 151 } | 154 } |
| 152 abstract class Pattern {} | 155 abstract class Pattern {} |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } | 393 } |
| 391 } | 394 } |
| 392 | 395 |
| 393 class MockDeferredLoadTask extends DeferredLoadTask { | 396 class MockDeferredLoadTask extends DeferredLoadTask { |
| 394 MockDeferredLoadTask(Compiler compiler) : super(compiler); | 397 MockDeferredLoadTask(Compiler compiler) : super(compiler); |
| 395 | 398 |
| 396 void registerMainApp(LibraryElement mainApp) { | 399 void registerMainApp(LibraryElement mainApp) { |
| 397 // Do nothing. | 400 // Do nothing. |
| 398 } | 401 } |
| 399 } | 402 } |
| OLD | NEW |