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

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

Issue 2999723002: Add stub versions of KernelInferrerEngine and friends (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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
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 '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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 void main() { 725 void main() {
726 Uri uri = new Uri(scheme: 'source'); 726 Uri uri = new Uri(scheme: 'source');
727 var compiler = compilerFor(TEST, uri); 727 var compiler = compilerFor(TEST, uri);
728 compiler.diagnosticHandler = createHandler(compiler, TEST); 728 compiler.diagnosticHandler = createHandler(compiler, TEST);
729 asyncTest(() => compiler.run(uri).then((_) { 729 asyncTest(() => compiler.run(uri).then((_) {
730 var typesInferrer = compiler.globalInference.typesInferrerInternal; 730 var typesInferrer = compiler.globalInference.typesInferrerInternal;
731 var closedWorld = typesInferrer.closedWorld; 731 var closedWorld = typesInferrer.closedWorld;
732 var commonMasks = closedWorld.commonMasks; 732 var commonMasks = closedWorld.commonMasks;
733 733
734 checkReturn(String name, type) { 734 checkReturn(String name, type) {
735 var element = findElement(compiler, name); 735 MemberElement element = findElement(compiler, name);
736 Expect.equals( 736 Expect.equals(
737 type, 737 type,
738 simplify( 738 simplify(
739 typesInferrer.getReturnTypeOfMember(element), closedWorld), 739 typesInferrer.getReturnTypeOfMember(element), closedWorld),
740 name); 740 name);
741 } 741 }
742 742
743 var interceptorType = commonMasks.interceptorType; 743 var interceptorType = commonMasks.interceptorType;
744 744
745 checkReturn('returnNum1', commonMasks.numType); 745 checkReturn('returnNum1', commonMasks.numType);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 checkReturn('testSpecialization3', commonMasks.uint31Type.nullable()); 881 checkReturn('testSpecialization3', commonMasks.uint31Type.nullable());
882 checkReturn('testReturnNull1', commonMasks.nullType); 882 checkReturn('testReturnNull1', commonMasks.nullType);
883 checkReturn('testReturnNull2', commonMasks.nullType); 883 checkReturn('testReturnNull2', commonMasks.nullType);
884 checkReturn('testReturnNull3', commonMasks.dynamicType); 884 checkReturn('testReturnNull3', commonMasks.dynamicType);
885 checkReturn('testReturnNull4', commonMasks.nullType); 885 checkReturn('testReturnNull4', commonMasks.nullType);
886 checkReturn('testReturnNull5', commonMasks.nullType); 886 checkReturn('testReturnNull5', commonMasks.nullType);
887 checkReturn('testReturnNull6', commonMasks.dynamicType); 887 checkReturn('testReturnNull6', commonMasks.dynamicType);
888 checkReturn('testReturnNotEquals', commonMasks.boolType); 888 checkReturn('testReturnNotEquals', commonMasks.boolType);
889 })); 889 }));
890 } 890 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698