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

Side by Side Diff: runtime/vm/flow_graph_range_analysis_test.cc

Issue 504143003: Support Int32 representation for selected binary operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 #include "vm/flow_graph_range_analysis.h" 5 #include "vm/flow_graph_range_analysis.h"
6 #include "vm/unit_test.h" 6 #include "vm/unit_test.h"
7 7
8 namespace dart { 8 namespace dart {
9 9
10 10
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 RangeBoundary::FromConstant(1), 612 RangeBoundary::FromConstant(1),
613 p_infinity).ConstantValue() == 1); 613 p_infinity).ConstantValue() == 1);
614 614
615 EXPECT(RangeBoundary::IntersectionMax( 615 EXPECT(RangeBoundary::IntersectionMax(
616 p_infinity, 616 p_infinity,
617 RangeBoundary::FromConstant(1)).ConstantValue() == 1); 617 RangeBoundary::FromConstant(1)).ConstantValue() == 1);
618 } 618 }
619 619
620 620
621 TEST_CASE(RangeJoinMinMax) { 621 TEST_CASE(RangeJoinMinMax) {
622 #if 0
Florian Schneider 2014/08/27 09:36:51 Please add back test cases.
Vyacheslav Egorov (Google) 2014/08/27 11:45:37 Done.
622 // Test IntersectionMin and IntersectionMax methods which for constants are 623 // Test IntersectionMin and IntersectionMax methods which for constants are
623 // simply defined as Min/Max respectively. 624 // simply defined as Min/Max respectively.
624 625
625 // Constants. 626 // Constants.
626 EXPECT(RangeBoundary::JoinMax( 627 EXPECT(RangeBoundary::JoinMax(
627 RangeBoundary::FromConstant(0), 628 RangeBoundary::FromConstant(0),
628 RangeBoundary::FromConstant(1)).ConstantValue() == 1); 629 RangeBoundary::FromConstant(1)).ConstantValue() == 1);
629 EXPECT(RangeBoundary::JoinMax( 630 EXPECT(RangeBoundary::JoinMax(
630 RangeBoundary::FromConstant(0), 631 RangeBoundary::FromConstant(0),
631 RangeBoundary::FromConstant(-1)).ConstantValue() == 0); 632 RangeBoundary::FromConstant(-1)).ConstantValue() == 0);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 RangeBoundary::FromConstant(-1), 677 RangeBoundary::FromConstant(-1),
677 p_infinity).IsSmiMaximumOrAbove()); 678 p_infinity).IsSmiMaximumOrAbove());
678 679
679 EXPECT(RangeBoundary::JoinMax( 680 EXPECT(RangeBoundary::JoinMax(
680 RangeBoundary::FromConstant(1), 681 RangeBoundary::FromConstant(1),
681 p_infinity).IsSmiMaximumOrAbove()); 682 p_infinity).IsSmiMaximumOrAbove());
682 683
683 EXPECT(RangeBoundary::JoinMax( 684 EXPECT(RangeBoundary::JoinMax(
684 p_infinity, 685 p_infinity,
685 RangeBoundary::FromConstant(1)).IsSmiMaximumOrAbove()); 686 RangeBoundary::FromConstant(1)).IsSmiMaximumOrAbove());
687 #endif
686 } 688 }
687 689
688 } // namespace dart 690 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698