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

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

Issue 23656005: Fix the merge of locals handler logic. (Closed) Base URL: http://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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 checkReturn('testBreak1', interceptorType.nullable()); 669 checkReturn('testBreak1', interceptorType.nullable());
670 checkReturn('testContinue2', interceptorType.nullable()); 670 checkReturn('testContinue2', interceptorType.nullable());
671 checkReturn('testBreak2', typesTask.intType.nullable()); 671 checkReturn('testBreak2', typesTask.intType.nullable());
672 checkReturn('testReturnElementOfConstList1', typesTask.intType); 672 checkReturn('testReturnElementOfConstList1', typesTask.intType);
673 checkReturn('testReturnElementOfConstList2', typesTask.intType); 673 checkReturn('testReturnElementOfConstList2', typesTask.intType);
674 checkReturn('testReturnItselfOrInt', typesTask.intType); 674 checkReturn('testReturnItselfOrInt', typesTask.intType);
675 checkReturn('testReturnInvokeDynamicGetter', typesTask.dynamicType); 675 checkReturn('testReturnInvokeDynamicGetter', typesTask.dynamicType);
676 676
677 checkReturn('testDoWhile1', typesTask.stringType); 677 checkReturn('testDoWhile1', typesTask.stringType);
678 checkReturn('testDoWhile2', typesTask.nullType); 678 checkReturn('testDoWhile2', typesTask.nullType);
679 checkReturn('testDoWhile3', interceptorType); 679 checkReturn('testDoWhile3', typesTask.intType);
680 checkReturn('testDoWhile4', typesTask.numType); 680 checkReturn('testDoWhile4', typesTask.numType);
681 681
682 checkReturnInClass(String className, String methodName, type) { 682 checkReturnInClass(String className, String methodName, type) {
683 var cls = findElement(compiler, className); 683 var cls = findElement(compiler, className);
684 var element = cls.lookupLocalMember(buildSourceString(methodName)); 684 var element = cls.lookupLocalMember(buildSourceString(methodName));
685 Expect.equals(type, 685 Expect.equals(type,
686 typesInferrer.getReturnTypeOfElement(element).simplify(compiler)); 686 typesInferrer.getReturnTypeOfElement(element).simplify(compiler));
687 } 687 }
688 688
689 checkReturnInClass('A', 'returnInt1', typesTask.intType); 689 checkReturnInClass('A', 'returnInt1', typesTask.intType);
(...skipping 23 matching lines...) Expand all
713 checkFactoryConstructor('A', ''); 713 checkFactoryConstructor('A', '');
714 714
715 checkReturn('testCascade1', typesTask.growableListType); 715 checkReturn('testCascade1', typesTask.growableListType);
716 checkReturn('testCascade2', new TypeMask.nonNullExact( 716 checkReturn('testCascade2', new TypeMask.nonNullExact(
717 typesTask.rawTypeOf(findElement(compiler, 'CascadeHelper')))); 717 typesTask.rawTypeOf(findElement(compiler, 'CascadeHelper'))));
718 checkReturn('testSpecialization1', typesTask.numType); 718 checkReturn('testSpecialization1', typesTask.numType);
719 checkReturn('testSpecialization2', typesTask.dynamicType); 719 checkReturn('testSpecialization2', typesTask.dynamicType);
720 checkReturn('testSpecialization3', typesTask.intType.nullable()); 720 checkReturn('testSpecialization3', typesTask.intType.nullable());
721 })); 721 }));
722 } 722 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698