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

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

Issue 16019002: Merge the dart:uri library into dart:core and update the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final cleanup Created 7 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 "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'compiler_helper.dart'; 6 import 'compiler_helper.dart';
7 import 'parser_helper.dart'; 7 import 'parser_helper.dart';
8 8
9 void compileAndFind(String code, String name, 9 void compileAndFind(String code, String name,
10 check(compiler, element)) { 10 check(compiler, element)) {
11 Uri uri = new Uri.fromComponents(scheme: 'source'); 11 Uri uri = new Uri(scheme: 'source');
12 var compiler = compilerFor(code, uri); 12 var compiler = compilerFor(code, uri);
13 compiler.runCompiler(uri); 13 compiler.runCompiler(uri);
14 var element = findElement(compiler, name); 14 var element = findElement(compiler, name);
15 return check(compiler, element); 15 return check(compiler, element);
16 } 16 }
17 17
18 void checkPrintType(String expression, checkType(compiler, type)) { 18 void checkPrintType(String expression, checkType(compiler, type)) {
19 compileAndFind( 19 compileAndFind(
20 'main() { print($expression); }', 20 'main() { print($expression); }',
21 'print', 21 'print',
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 Expect.identical( 96 Expect.identical(
97 inferrer.nullType, 97 inferrer.nullType,
98 typesTask.getGuaranteedTypeOfElement(thirdParameter)); 98 typesTask.getGuaranteedTypeOfElement(thirdParameter));
99 }); 99 });
100 } 100 }
101 101
102 void main() { 102 void main() {
103 testBasicTypes(); 103 testBasicTypes();
104 testOptionalParameters(); 104 testOptionalParameters();
105 } 105 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | tests/compiler/dart2js/cpa_inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698