| 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("../../../../lib/uri/uri.dart"); | 7 #import("../../../../lib/uri/uri.dart"); |
| 8 | 8 |
| 9 #import("../../../leg/elements/elements.dart"); | 9 #import("../../../leg/elements/elements.dart"); |
| 10 #import("../../../leg/io/io.dart", prefix: 'io'); | 10 #import("../../../leg/io/io.dart", prefix: 'io'); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 guard$array(x) { return x; } | 29 guard$array(x) { return x; } |
| 30 guard$num(x) { return x; } | 30 guard$num(x) { return x; } |
| 31 guard$string(x) { return x; } | 31 guard$string(x) { return x; } |
| 32 guard$stringOrArray(x) { return x; } | 32 guard$stringOrArray(x) { return x; } |
| 33 builtin$add$1(receiver, value) {} | 33 builtin$add$1(receiver, value) {} |
| 34 builtin$get$length(var receiver) {} | 34 builtin$get$length(var receiver) {} |
| 35 builtin$filter$1(receiver, predicate) {} | 35 builtin$filter$1(receiver, predicate) {} |
| 36 builtin$removeLast$0(receiver) {} | 36 builtin$removeLast$0(receiver) {} |
| 37 index(a, index) {} | 37 index(a, index) {} |
| 38 indexSet(a, index, value) {} | 38 indexSet(a, index, value) {} |
| 39 class Closure {} '''; | 39 class Closure {} |
| 40 builtin$iterator$0() {} |
| 41 builtin$next$0() {} |
| 42 builtin$hasNext$0() {}'''; |
| 40 | 43 |
| 41 final String DEFAULT_CORELIB = @''' | 44 final String DEFAULT_CORELIB = @''' |
| 42 print(var obj) {} | 45 print(var obj) {} |
| 43 class int {} | 46 class int {} |
| 44 class double {} | 47 class double {} |
| 45 class bool {} | 48 class bool {} |
| 46 class String {} | 49 class String {} |
| 47 class Object {}'''; | 50 class Object {}'''; |
| 48 | 51 |
| 49 class MockCompiler extends Compiler { | 52 class MockCompiler extends Compiler { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 importLibrary(library, compiler.coreLibrary, compiler); | 188 importLibrary(library, compiler.coreLibrary, compiler); |
| 186 return library; | 189 return library; |
| 187 } | 190 } |
| 188 | 191 |
| 189 class StringScript extends Script { | 192 class StringScript extends Script { |
| 190 final String code; | 193 final String code; |
| 191 StringScript(this.code) : super(null, null); | 194 StringScript(this.code) : super(null, null); |
| 192 String get text() => code; | 195 String get text() => code; |
| 193 String get name() => "mock script"; | 196 String get name() => "mock script"; |
| 194 } | 197 } |
| OLD | NEW |