| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 interface int extends num {} | 56 interface int extends num {} |
| 57 interface double extends num {} | 57 interface double extends num {} |
| 58 class bool {} | 58 class bool {} |
| 59 class String {} | 59 class String {} |
| 60 class Object {} | 60 class Object {} |
| 61 interface num {} | 61 interface num {} |
| 62 class Function {} | 62 class Function {} |
| 63 class List {} | 63 class List {} |
| 64 class Closure {} | 64 class Closure {} |
| 65 class Null {} | 65 class Null {} |
| 66 class Dynamic {}'''; | 66 class Dynamic_ {}'''; |
| 67 | 67 |
| 68 class MockCompiler extends Compiler { | 68 class MockCompiler extends Compiler { |
| 69 List<WarningMessage> warnings; | 69 List<WarningMessage> warnings; |
| 70 List<WarningMessage> errors; | 70 List<WarningMessage> errors; |
| 71 final Map<String, SourceFile> sourceFiles; | 71 final Map<String, SourceFile> sourceFiles; |
| 72 Node parsedTree; | 72 Node parsedTree; |
| 73 | 73 |
| 74 MockCompiler([String coreSource = DEFAULT_CORELIB, | 74 MockCompiler([String coreSource = DEFAULT_CORELIB, |
| 75 String helperSource = DEFAULT_HELPERLIB, | 75 String helperSource = DEFAULT_HELPERLIB, |
| 76 String interceptorsSource = DEFAULT_INTERCEPTORSLIB, | 76 String interceptorsSource = DEFAULT_INTERCEPTORSLIB, |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 }); | 212 }); |
| 213 } | 213 } |
| 214 } | 214 } |
| 215 | 215 |
| 216 LibraryElement mockLibrary(Compiler compiler, String source) { | 216 LibraryElement mockLibrary(Compiler compiler, String source) { |
| 217 Uri uri = new Uri.fromComponents(scheme: "source"); | 217 Uri uri = new Uri.fromComponents(scheme: "source"); |
| 218 var library = new LibraryElement(new Script(uri, new MockFile(source))); | 218 var library = new LibraryElement(new Script(uri, new MockFile(source))); |
| 219 importLibrary(library, compiler.coreLibrary, compiler); | 219 importLibrary(library, compiler.coreLibrary, compiler); |
| 220 return library; | 220 return library; |
| 221 } | 221 } |
| OLD | NEW |