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

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

Issue 23819039: Create type masks lazily. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 7 import
8 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' 8 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'
9 show TypeMask; 9 show TypeMask;
10 10
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 checkFactoryConstructor(String className, String factoryName) { 723 checkFactoryConstructor(String className, String factoryName) {
724 var cls = findElement(compiler, className); 724 var cls = findElement(compiler, className);
725 var element = cls.localLookup(buildSourceString(factoryName)); 725 var element = cls.localLookup(buildSourceString(factoryName));
726 Expect.equals(new TypeMask.nonNullExact(cls.rawType), 726 Expect.equals(new TypeMask.nonNullExact(cls.rawType),
727 typesInferrer.getReturnTypeOfElement(element)); 727 typesInferrer.getReturnTypeOfElement(element));
728 } 728 }
729 checkFactoryConstructor('A', ''); 729 checkFactoryConstructor('A', '');
730 730
731 checkReturn('testCascade1', typesTask.growableListType); 731 checkReturn('testCascade1', typesTask.growableListType);
732 checkReturn('testCascade2', new TypeMask.nonNullExact( 732 checkReturn('testCascade2', new TypeMask.nonNullExact(
733 typesTask.rawTypeOf(findElement(compiler, 'CascadeHelper')))); 733 findElement(compiler, 'CascadeHelper').rawType));
734 checkReturn('testSpecialization1', typesTask.numType); 734 checkReturn('testSpecialization1', typesTask.numType);
735 checkReturn('testSpecialization2', typesTask.dynamicType); 735 checkReturn('testSpecialization2', typesTask.dynamicType);
736 checkReturn('testSpecialization3', typesTask.intType.nullable()); 736 checkReturn('testSpecialization3', typesTask.intType.nullable());
737 })); 737 }));
738 } 738 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698