| 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 import "dart:uri"; | 5 import "dart:uri"; |
| 6 import "../../../lib/compiler/implementation/elements/elements.dart"; | 6 import "../../../lib/compiler/implementation/elements/elements.dart"; |
| 7 import '../../../lib/compiler/implementation/scanner/scannerlib.dart'; | 7 import '../../../lib/compiler/implementation/scanner/scannerlib.dart'; |
| 8 import '../../../lib/compiler/implementation/source_file.dart'; | 8 import '../../../lib/compiler/implementation/source_file.dart'; |
| 9 import '../../../lib/compiler/implementation/types/types.dart'; | 9 import '../../../lib/compiler/implementation/types/types.dart'; |
| 10 import '../../../lib/compiler/implementation/tree/tree.dart'; | 10 import '../../../lib/compiler/implementation/tree/tree.dart'; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 abstract class int extends num { } | 128 abstract class int extends num { } |
| 129 abstract class double extends num { } | 129 abstract class double extends num { } |
| 130 class bool {} | 130 class bool {} |
| 131 class String {} | 131 class String {} |
| 132 class Object {} | 132 class Object {} |
| 133 class Function {} | 133 class Function {} |
| 134 abstract class List {} | 134 abstract class List {} |
| 135 abstract class Map {} | 135 abstract class Map {} |
| 136 class Closure {} | 136 class Closure {} |
| 137 class Null {} | 137 class Null {} |
| 138 class Type {} |
| 138 class Dynamic_ {} | 139 class Dynamic_ {} |
| 139 bool identical(Object a, Object b) {}'''; | 140 bool identical(Object a, Object b) {}'''; |
| 140 | 141 |
| 141 AnalysisResult analyze(String code) { | 142 AnalysisResult analyze(String code) { |
| 142 Uri uri = new Uri.fromComponents(scheme: 'source'); | 143 Uri uri = new Uri.fromComponents(scheme: 'source'); |
| 143 MockCompiler compiler = new MockCompiler(coreSource: CORELIB, | 144 MockCompiler compiler = new MockCompiler(coreSource: CORELIB, |
| 144 enableConcreteTypeInference: true); | 145 enableConcreteTypeInference: true); |
| 145 compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code); | 146 compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code); |
| 146 compiler.runCompiler(uri); | 147 compiler.runCompiler(uri); |
| 147 return new AnalysisResult(compiler); | 148 return new AnalysisResult(compiler); |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 testGetters(); | 538 testGetters(); |
| 538 testSetters(); | 539 testSetters(); |
| 539 testNamedParameters(); | 540 testNamedParameters(); |
| 540 testListLiterals(); | 541 testListLiterals(); |
| 541 testMapLiterals(); | 542 testMapLiterals(); |
| 542 testReturn(); | 543 testReturn(); |
| 543 // testNoReturn(); // right now we infer the empty type instead of null | 544 // testNoReturn(); // right now we infer the empty type instead of null |
| 544 testArithmeticOperators(); | 545 testArithmeticOperators(); |
| 545 testOperators(); | 546 testOperators(); |
| 546 } | 547 } |
| OLD | NEW |