| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 const String DEFAULT_CORELIB = r''' | 64 const String DEFAULT_CORELIB = r''' |
| 65 print(var obj) {} | 65 print(var obj) {} |
| 66 abstract class num {} | 66 abstract class num {} |
| 67 abstract class int extends num { } | 67 abstract class int extends num { } |
| 68 abstract class double extends num { } | 68 abstract class double extends num { } |
| 69 class bool {} | 69 class bool {} |
| 70 class String {} | 70 class String {} |
| 71 class Object {} | 71 class Object {} |
| 72 class Type {} | 72 class Type {} |
| 73 class Function {} | 73 class Function {} |
| 74 class List {} | 74 class List<T> {} |
| 75 abstract class Map {} | 75 abstract class Map<K,V> {} |
| 76 class Closure {} | 76 class Closure {} |
| 77 class Null {} | 77 class Null {} |
| 78 class Dynamic_ {} | 78 class Dynamic_ {} |
| 79 bool identical(Object a, Object b) {}'''; | 79 bool identical(Object a, Object b) {}'''; |
| 80 | 80 |
| 81 class MockCompiler extends Compiler { | 81 class MockCompiler extends Compiler { |
| 82 List<WarningMessage> warnings; | 82 List<WarningMessage> warnings; |
| 83 List<WarningMessage> errors; | 83 List<WarningMessage> errors; |
| 84 final Map<String, SourceFile> sourceFiles; | 84 final Map<String, SourceFile> sourceFiles; |
| 85 Node parsedTree; | 85 Node parsedTree; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 operator []=(Node node, Element element) { | 262 operator []=(Node node, Element element) { |
| 263 map[node] = element; | 263 map[node] = element; |
| 264 } | 264 } |
| 265 | 265 |
| 266 operator [](Node node) => map[node]; | 266 operator [](Node node) => map[node]; |
| 267 | 267 |
| 268 void remove(Node node) { | 268 void remove(Node node) { |
| 269 map.remove(node); | 269 map.remove(node); |
| 270 } | 270 } |
| 271 } | 271 } |
| OLD | NEW |