| OLD | NEW |
| 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 'package:compiler/src/types/types.dart' show TypeMask; | 7 import 'package:compiler/src/types/types.dart' show TypeMask; |
| 8 import 'type_mask_test_helper.dart'; | 8 import 'type_mask_test_helper.dart'; |
| 9 | 9 |
| 10 import 'compiler_helper.dart'; | 10 import 'compiler_helper.dart'; |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 checkFactoryConstructor(String className, String factoryName) { | 865 checkFactoryConstructor(String className, String factoryName) { |
| 866 var cls = findElement(compiler, className); | 866 var cls = findElement(compiler, className); |
| 867 var element = cls.localLookup(factoryName); | 867 var element = cls.localLookup(factoryName); |
| 868 Expect.equals(new TypeMask.nonNullExact(cls, closedWorld), | 868 Expect.equals(new TypeMask.nonNullExact(cls, closedWorld), |
| 869 typesInferrer.getReturnTypeOfElement(element)); | 869 typesInferrer.getReturnTypeOfElement(element)); |
| 870 } | 870 } |
| 871 | 871 |
| 872 checkFactoryConstructor('A', ''); | 872 checkFactoryConstructor('A', ''); |
| 873 | 873 |
| 874 checkReturn('testCascade1', commonMasks.growableListType); | 874 checkReturn('testCascade1', commonMasks.growableListType); |
| 875 checkReturn( | 875 ClassElement clsCascadeHelper = findElement(compiler, 'CascadeHelper'); |
| 876 'testCascade2', | 876 checkReturn('testCascade2', |
| 877 new TypeMask.nonNullExact( | 877 new TypeMask.nonNullExact(clsCascadeHelper, closedWorld)); |
| 878 findElement(compiler, 'CascadeHelper'), closedWorld)); | |
| 879 checkReturn('testSpecialization1', commonMasks.numType); | 878 checkReturn('testSpecialization1', commonMasks.numType); |
| 880 checkReturn('testSpecialization2', commonMasks.dynamicType); | 879 checkReturn('testSpecialization2', commonMasks.dynamicType); |
| 881 checkReturn('testSpecialization3', commonMasks.uint31Type.nullable()); | 880 checkReturn('testSpecialization3', commonMasks.uint31Type.nullable()); |
| 882 checkReturn('testReturnNull1', commonMasks.nullType); | 881 checkReturn('testReturnNull1', commonMasks.nullType); |
| 883 checkReturn('testReturnNull2', commonMasks.nullType); | 882 checkReturn('testReturnNull2', commonMasks.nullType); |
| 884 checkReturn('testReturnNull3', commonMasks.dynamicType); | 883 checkReturn('testReturnNull3', commonMasks.dynamicType); |
| 885 checkReturn('testReturnNull4', commonMasks.nullType); | 884 checkReturn('testReturnNull4', commonMasks.nullType); |
| 886 checkReturn('testReturnNull5', commonMasks.nullType); | 885 checkReturn('testReturnNull5', commonMasks.nullType); |
| 887 checkReturn('testReturnNull6', commonMasks.dynamicType); | 886 checkReturn('testReturnNull6', commonMasks.dynamicType); |
| 888 checkReturn('testReturnNotEquals', commonMasks.boolType); | 887 checkReturn('testReturnNotEquals', commonMasks.boolType); |
| 889 })); | 888 })); |
| 890 } | 889 } |
| OLD | NEW |