| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 class List<E> { | 200 class List<E> { |
| 201 List([length]); | 201 List([length]); |
| 202 List.filled(length, element); | 202 List.filled(length, element); |
| 203 } | 203 } |
| 204 abstract class Map<K,V> {} | 204 abstract class Map<K,V> {} |
| 205 class DateTime { | 205 class DateTime { |
| 206 DateTime(year); | 206 DateTime(year); |
| 207 DateTime.utc(year); | 207 DateTime.utc(year); |
| 208 } | 208 } |
| 209 abstract class Pattern {} | 209 abstract class Pattern {} |
| 210 bool identical(Object a, Object b) { return true; }'''; | 210 bool identical(Object a, Object b) { return true; } |
| 211 const proxy = 0;'''; |
| 211 | 212 |
| 212 const String DEFAULT_ISOLATE_HELPERLIB = r''' | 213 const String DEFAULT_ISOLATE_HELPERLIB = r''' |
| 213 var startRootIsolate; | 214 var startRootIsolate; |
| 214 var _currentIsolate; | 215 var _currentIsolate; |
| 215 var _callInIsolate; | 216 var _callInIsolate; |
| 216 class _WorkerBase {}'''; | 217 class _WorkerBase {}'''; |
| 217 | 218 |
| 218 class MockCompiler extends Compiler { | 219 class MockCompiler extends Compiler { |
| 219 api.DiagnosticHandler diagnosticHandler; | 220 api.DiagnosticHandler diagnosticHandler; |
| 220 List<WarningMessage> warnings; | 221 List<WarningMessage> warnings; |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } else { | 549 } else { |
| 549 sourceFile = compiler.sourceFiles[uri.toString()]; | 550 sourceFile = compiler.sourceFiles[uri.toString()]; |
| 550 } | 551 } |
| 551 if (sourceFile != null && begin != null && end != null) { | 552 if (sourceFile != null && begin != null && end != null) { |
| 552 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); | 553 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); |
| 553 } else { | 554 } else { |
| 554 print(message); | 555 print(message); |
| 555 } | 556 } |
| 556 }; | 557 }; |
| 557 } | 558 } |
| OLD | NEW |