| 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 'dart:uri'; | 7 import 'dart:uri'; |
| 8 | 8 |
| 9 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; | 9 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; |
| 10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' | 10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 const String DEFAULT_CORELIB = r''' | 74 const String DEFAULT_CORELIB = r''' |
| 75 print(var obj) {} | 75 print(var obj) {} |
| 76 abstract class num {} | 76 abstract class num {} |
| 77 abstract class int extends num { } | 77 abstract class int extends num { } |
| 78 abstract class double extends num { } | 78 abstract class double extends num { } |
| 79 class bool {} | 79 class bool {} |
| 80 class String {} | 80 class String {} |
| 81 class Object {} | 81 class Object {} |
| 82 class Type {} | 82 class Type {} |
| 83 class Function {} | 83 class Function {} |
| 84 class List {} | 84 class List<T> {} |
| 85 abstract class Map {} | 85 abstract class Map<K,V> {} |
| 86 class Closure {} | 86 class Closure {} |
| 87 class Null {} | 87 class Null {} |
| 88 class Dynamic_ {} | 88 class Dynamic_ {} |
| 89 bool identical(Object a, Object b) {}'''; | 89 bool identical(Object a, Object b) {}'''; |
| 90 | 90 |
| 91 class MockCompiler extends Compiler { | 91 class MockCompiler extends Compiler { |
| 92 List<WarningMessage> warnings; | 92 List<WarningMessage> warnings; |
| 93 List<WarningMessage> errors; | 93 List<WarningMessage> errors; |
| 94 final Map<String, SourceFile> sourceFiles; | 94 final Map<String, SourceFile> sourceFiles; |
| 95 Node parsedTree; | 95 Node parsedTree; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 operator []=(Node node, Element element) { | 272 operator []=(Node node, Element element) { |
| 273 map[node] = element; | 273 map[node] = element; |
| 274 } | 274 } |
| 275 | 275 |
| 276 operator [](Node node) => map[node]; | 276 operator [](Node node) => map[node]; |
| 277 | 277 |
| 278 void remove(Node node) { | 278 void remove(Node node) { |
| 279 map.remove(node); | 279 map.remove(node); |
| 280 } | 280 } |
| 281 } | 281 } |
| OLD | NEW |