| 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 'dart:async'; | 8 import 'dart:async'; |
| 9 import '../../sdk/lib/_internal/compiler/compiler.dart'; | 9 import '../../sdk/lib/_internal/compiler/compiler.dart'; |
| 10 import 'dart:uri'; | 10 import 'dart:uri'; |
| 11 | 11 |
| 12 const CORE_LIB = """ | 12 const CORE_LIB = """ |
| 13 library core; | 13 library core; |
| 14 class Object{ | 14 class Object{ |
| 15 operator==(other) {} | 15 operator==(other) {} |
| 16 } | 16 } |
| 17 class bool {} | 17 class bool {} |
| 18 class num {} | 18 class num {} |
| 19 class int {} | 19 class int {} |
| 20 class double{} | 20 class double{} |
| 21 class String{} | 21 class String{} |
| 22 class Function{} | 22 class Function{} |
| 23 class List {} | 23 class List {} |
| 24 class Map {} | 24 class Map {} |
| 25 class Closure {} | 25 class Closure {} |
| 26 class Dynamic_ {} | 26 class Dynamic_ {} |
| 27 class Type {} | 27 class Type {} |
| 28 class Null {} | 28 class Null {} |
| 29 class StackTrace {} |
| 29 class LinkedHashMap {} | 30 class LinkedHashMap {} |
| 30 getRuntimeTypeInfo(o) {} | 31 getRuntimeTypeInfo(o) {} |
| 31 setRuntimeTypeInfo(o, i) {} | 32 setRuntimeTypeInfo(o, i) {} |
| 32 eqNull(a) {} | 33 eqNull(a) {} |
| 33 eqNullB(a) {} | 34 eqNullB(a) {} |
| 34 class JSInvocationMirror {} // Should be in helper. | 35 class JSInvocationMirror {} // Should be in helper. |
| 35 """; | 36 """; |
| 36 | 37 |
| 37 const INTERCEPTORS_LIB = """ | 38 const INTERCEPTORS_LIB = """ |
| 38 library interceptors; | 39 library interceptors; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 Expect.isNull(code); | 112 Expect.isNull(code); |
| 112 Expect.isTrue(10 < count); | 113 Expect.isTrue(10 < count); |
| 113 // Two warnings for each time RECURSIVE_MAIN is read, except the | 114 // Two warnings for each time RECURSIVE_MAIN is read, except the |
| 114 // first time. | 115 // first time. |
| 115 Expect.equals(2 * (count - 1), warningCount); | 116 Expect.equals(2 * (count - 1), warningCount); |
| 116 Expect.equals(1, errorCount); | 117 Expect.equals(1, errorCount); |
| 117 }, onError: (e) { | 118 }, onError: (e) { |
| 118 throw 'Compilation failed'; | 119 throw 'Compilation failed'; |
| 119 }); | 120 }); |
| 120 } | 121 } |
| OLD | NEW |