| 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("../../../../lib/compiler/implementation/elements/elements.dart"); | 9 #import("../../../../lib/compiler/implementation/elements/elements.dart"); |
| 10 #import("../../../../lib/compiler/implementation/leg.dart"); | 10 #import("../../../../lib/compiler/implementation/leg.dart"); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 final String DEFAULT_CORELIB = @''' | 42 final String DEFAULT_CORELIB = @''' |
| 43 print(var obj) {} | 43 print(var obj) {} |
| 44 class int {} | 44 class int {} |
| 45 class double {} | 45 class double {} |
| 46 class bool {} | 46 class bool {} |
| 47 class String {} | 47 class String {} |
| 48 class Object {} | 48 class Object {} |
| 49 class num {} | 49 class num {} |
| 50 class Function {} | 50 class Function {} |
| 51 class List {} | 51 class List { factory List() => null; } |
| 52 class Closure {} | 52 class Closure {} |
| 53 class Null {} | 53 class Null {} |
| 54 class Dynamic {}'''; | 54 class Dynamic {}'''; |
| 55 | 55 |
| 56 class MockCompiler extends Compiler { | 56 class MockCompiler extends Compiler { |
| 57 List<WarningMessage> warnings; | 57 List<WarningMessage> warnings; |
| 58 List<WarningMessage> errors; | 58 List<WarningMessage> errors; |
| 59 final Map<String, String> sources; | 59 final Map<String, String> sources; |
| 60 Node parsedTree; | 60 Node parsedTree; |
| 61 | 61 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 importLibrary(library, compiler.coreLibrary, compiler); | 188 importLibrary(library, compiler.coreLibrary, compiler); |
| 189 return library; | 189 return library; |
| 190 } | 190 } |
| 191 | 191 |
| 192 class StringScript extends Script { | 192 class StringScript extends Script { |
| 193 final String code; | 193 final String code; |
| 194 StringScript(this.code) : super(null, null); | 194 StringScript(this.code) : super(null, null); |
| 195 String get text() => code; | 195 String get text() => code; |
| 196 String get name() => "mock script"; | 196 String get name() => "mock script"; |
| 197 } | 197 } |
| OLD | NEW |