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

Side by Side Diff: tests/compiler/dart2js/simple_inferrer_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 6 import
7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' 7 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'
8 show TypeMask; 8 show TypeMask;
9 9
10 import 'compiler_helper.dart'; 10 import 'compiler_helper.dart';
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 ..returnInt4() 450 ..returnInt4()
451 ..returnInt5() 451 ..returnInt5()
452 ..returnInt6() 452 ..returnInt6()
453 ..returnInt7() 453 ..returnInt7()
454 ..returnInt8() 454 ..returnInt8()
455 ..returnInt9(); 455 ..returnInt9();
456 } 456 }
457 """; 457 """;
458 458
459 void main() { 459 void main() {
460 Uri uri = new Uri.fromComponents(scheme: 'source'); 460 Uri uri = new Uri(scheme: 'source');
461 var compiler = compilerFor(TEST, uri); 461 var compiler = compilerFor(TEST, uri);
462 compiler.runCompiler(uri); 462 compiler.runCompiler(uri);
463 var typesInferrer = compiler.typesTask.typesInferrer; 463 var typesInferrer = compiler.typesTask.typesInferrer;
464 464
465 checkReturn(String name, type) { 465 checkReturn(String name, type) {
466 var element = findElement(compiler, name); 466 var element = findElement(compiler, name);
467 Expect.equals( 467 Expect.equals(
468 type, 468 type,
469 typesInferrer.internal.returnTypeOf[element].simplify(compiler), 469 typesInferrer.internal.returnTypeOf[element].simplify(compiler),
470 name); 470 name);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 checkReturnInClass('B', 'returnInt9', typesInferrer.intType); 552 checkReturnInClass('B', 'returnInt9', typesInferrer.intType);
553 553
554 checkFactoryConstructor(String className) { 554 checkFactoryConstructor(String className) {
555 var cls = findElement(compiler, className); 555 var cls = findElement(compiler, className);
556 var element = cls.localLookup(buildSourceString(className)); 556 var element = cls.localLookup(buildSourceString(className));
557 Expect.equals(new TypeMask.nonNullExact(cls.rawType), 557 Expect.equals(new TypeMask.nonNullExact(cls.rawType),
558 typesInferrer.internal.returnTypeOf[element]); 558 typesInferrer.internal.returnTypeOf[element]);
559 } 559 }
560 checkFactoryConstructor('A'); 560 checkFactoryConstructor('A');
561 } 561 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698