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 "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt'; | 6 import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt'; |
7 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart'; | 7 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart'; |
8 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; | 8 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; |
9 | 9 |
10 import "parser_helper.dart"; | 10 import "parser_helper.dart"; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void operator []=(int index, E value); | 164 void operator []=(int index, E value); |
165 } | 165 } |
166 abstract class Map<K, V> {} | 166 abstract class Map<K, V> {} |
167 class Closure {} | 167 class Closure {} |
168 class Null {} | 168 class Null {} |
169 class Type {} | 169 class Type {} |
170 class Dynamic_ {} | 170 class Dynamic_ {} |
171 bool identical(Object a, Object b) {}'''; | 171 bool identical(Object a, Object b) {}'''; |
172 | 172 |
173 AnalysisResult analyze(String code, {int maxConcreteTypeSize: 1000}) { | 173 AnalysisResult analyze(String code, {int maxConcreteTypeSize: 1000}) { |
174 Uri uri = new Uri.fromComponents(scheme: 'source'); | 174 Uri uri = new Uri(scheme: 'source'); |
175 MockCompiler compiler = new MockCompiler( | 175 MockCompiler compiler = new MockCompiler( |
176 coreSource: CORELIB, | 176 coreSource: CORELIB, |
177 enableConcreteTypeInference: true, | 177 enableConcreteTypeInference: true, |
178 maxConcreteTypeSize: maxConcreteTypeSize); | 178 maxConcreteTypeSize: maxConcreteTypeSize); |
179 compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code); | 179 compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code); |
180 compiler.typesTask.concreteTypesInferrer.testMode = true; | 180 compiler.typesTask.concreteTypesInferrer.testMode = true; |
181 compiler.runCompiler(uri); | 181 compiler.runCompiler(uri); |
182 return new AnalysisResult(compiler); | 182 return new AnalysisResult(compiler); |
183 } | 183 } |
184 | 184 |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 testListWithCapacity(); | 1399 testListWithCapacity(); |
1400 testEmptyList(); | 1400 testEmptyList(); |
1401 testJsCall(); | 1401 testJsCall(); |
1402 testIsCheck(); | 1402 testIsCheck(); |
1403 testSeenClasses(); | 1403 testSeenClasses(); |
1404 testGoodGuys(); | 1404 testGoodGuys(); |
1405 testIntDoubleNum(); | 1405 testIntDoubleNum(); |
1406 testConcreteTypeToTypeMask(); | 1406 testConcreteTypeToTypeMask(); |
1407 testSelectors(); | 1407 testSelectors(); |
1408 } | 1408 } |
OLD | NEW |