Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: tests/compiler/dart2js/cpa_inference_test.dart

Issue 326913002: Make dart2js unittests async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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:async'; 5 import 'dart:async';
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart'; 8 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart';
9 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; 9 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart';
10 import '../../../sdk/lib/_internal/compiler/implementation/inferrer/concrete_typ es_inferrer.dart'; 10 import '../../../sdk/lib/_internal/compiler/implementation/inferrer/concrete_typ es_inferrer.dart';
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 abstract class Map<K, V> {} 181 abstract class Map<K, V> {}
182 class Closure {} 182 class Closure {}
183 class Type {} 183 class Type {}
184 class StackTrace {} 184 class StackTrace {}
185 class Dynamic_ {} 185 class Dynamic_ {}
186 bool identical(Object a, Object b) {} 186 bool identical(Object a, Object b) {}
187 const proxy = 0;'''; 187 const proxy = 0;''';
188 188
189 Future<AnalysisResult> analyze(String code, {int maxConcreteTypeSize: 1000}) { 189 Future<AnalysisResult> analyze(String code, {int maxConcreteTypeSize: 1000}) {
190 Uri uri = new Uri(scheme: 'source'); 190 Uri uri = new Uri(scheme: 'source');
191 MockCompiler compiler = new MockCompiler( 191 MockCompiler compiler = new MockCompiler.internal(
192 coreSource: CORELIB, 192 coreSource: CORELIB,
193 enableConcreteTypeInference: true, 193 enableConcreteTypeInference: true,
194 maxConcreteTypeSize: maxConcreteTypeSize); 194 maxConcreteTypeSize: maxConcreteTypeSize);
195 compiler.sourceFiles[uri.toString()] = 195 compiler.sourceFiles[uri.toString()] =
196 new StringSourceFile(uri.toString(), code); 196 new StringSourceFile(uri.toString(), code);
197 compiler.typesTask.concreteTypesInferrer.testMode = true; 197 compiler.typesTask.concreteTypesInferrer.testMode = true;
198 return compiler.runCompiler(uri).then((_) { 198 return compiler.runCompiler(uri).then((_) {
199 return new AnalysisResult(compiler); 199 return new AnalysisResult(compiler);
200 }); 200 });
201 } 201 }
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 testClosures10, 2168 testClosures10,
2169 testClosures11, 2169 testClosures11,
2170 testClosures12, 2170 testClosures12,
2171 testRefinement, 2171 testRefinement,
2172 testDefaultArguments, 2172 testDefaultArguments,
2173 testSuperConstructorCall, 2173 testSuperConstructorCall,
2174 testSuperConstructorCall2, 2174 testSuperConstructorCall2,
2175 testSuperConstructorCall3, 2175 testSuperConstructorCall3,
2176 ], (f) => f())); 2176 ], (f) => f()));
2177 } 2177 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/constant_namer_test.dart ('k') | tests/compiler/dart2js/dart_backend_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698