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 // Test of "recursive" imports using the dart2js compiler API. | 5 // Test of "recursive" imports using the dart2js compiler API. |
6 | 6 |
7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
8 import "package:async_helper/async_helper.dart"; | 8 import "package:async_helper/async_helper.dart"; |
9 import 'dart:async'; | 9 import 'dart:async'; |
10 import '../../sdk/lib/_internal/compiler/compiler.dart'; | 10 import '../../sdk/lib/_internal/compiler/compiler.dart'; |
(...skipping 24 matching lines...) Expand all Loading... |
35 eqNull(a) {} | 35 eqNull(a) {} |
36 eqNullB(a) {} | 36 eqNullB(a) {} |
37 class JSInvocationMirror {} // Should be in helper. | 37 class JSInvocationMirror {} // Should be in helper. |
38 class _Proxy { const _Proxy(); } | 38 class _Proxy { const _Proxy(); } |
39 const proxy = const _Proxy(); | 39 const proxy = const _Proxy(); |
40 """; | 40 """; |
41 | 41 |
42 const INTERCEPTORS_LIB = """ | 42 const INTERCEPTORS_LIB = """ |
43 library interceptors; | 43 library interceptors; |
44 class JSIndexable { | 44 class JSIndexable { |
45 get length; | 45 get length {} |
46 } | 46 } |
47 class JSMutableIndexable {} | 47 class JSMutableIndexable {} |
48 class JSArray { | 48 class JSArray { |
49 JSArray() {} | 49 JSArray() {} |
50 factory JSArray.typed(a) => a; | 50 factory JSArray.typed(a) => a; |
51 removeLast() => null; | 51 removeLast() => null; |
52 add(x) { } | 52 add(x) { } |
53 } | 53 } |
54 class JSMutableArray extends JSArray {} | 54 class JSMutableArray extends JSArray {} |
55 class JSExtendableArray extends JSMutableArray {} | 55 class JSExtendableArray extends JSMutableArray {} |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 Expect.isNull(code); | 127 Expect.isNull(code); |
128 Expect.isTrue(10 < count); | 128 Expect.isTrue(10 < count); |
129 // Two warnings for each time RECURSIVE_MAIN is read, except the | 129 // Two warnings for each time RECURSIVE_MAIN is read, except the |
130 // first time. | 130 // first time. |
131 Expect.equals(2 * (count - 1), warningCount); | 131 Expect.equals(2 * (count - 1), warningCount); |
132 Expect.equals(1, errorCount); | 132 Expect.equals(1, errorCount); |
133 }, onError: (e) { | 133 }, onError: (e) { |
134 throw 'Compilation failed'; | 134 throw 'Compilation failed'; |
135 }).then(asyncSuccess); | 135 }).then(asyncSuccess); |
136 } | 136 } |
OLD | NEW |