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

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

Issue 794713002: Fix vm/cc/RangeAnd test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « no previous file | 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) 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 RangeBoundary(static_cast<int64_t>(0xffffffff))); 519 RangeBoundary(static_cast<int64_t>(0xffffffff)));
520 520
521 // [-20, 20] & [0xffffffff, 0xffffffff] = [0x0, 0xffffffff]. 521 // [-20, 20] & [0xffffffff, 0xffffffff] = [0x0, 0xffffffff].
522 TEST_RANGE_AND(static_cast<int64_t>(-20), 522 TEST_RANGE_AND(static_cast<int64_t>(-20),
523 static_cast<int64_t>(20), 523 static_cast<int64_t>(20),
524 static_cast<int64_t>(0xffffffff), 524 static_cast<int64_t>(0xffffffff),
525 static_cast<int64_t>(0xffffffff), 525 static_cast<int64_t>(0xffffffff),
526 RangeBoundary(0), 526 RangeBoundary(0),
527 RangeBoundary(static_cast<int64_t>(0xffffffff))); 527 RangeBoundary(static_cast<int64_t>(0xffffffff)));
528 528
529 // Test that [-20, 20] & [-20, 20] = [Unknown, Unknown]. 529 // Test that [-20, 20] & [-20, 20] = [-32, 31].
530 TEST_RANGE_AND(static_cast<int64_t>(-20), 530 TEST_RANGE_AND(static_cast<int64_t>(-20),
531 static_cast<int64_t>(20), 531 static_cast<int64_t>(20),
532 static_cast<int64_t>(-20), 532 static_cast<int64_t>(-20),
533 static_cast<int64_t>(20), 533 static_cast<int64_t>(20),
534 RangeBoundary::MinConstant(RangeBoundary::kRangeBoundaryInt64), 534 RangeBoundary(-32),
535 RangeBoundary::MaxConstant( 535 RangeBoundary(31));
536 RangeBoundary::kRangeBoundaryInt64));
537 536
538 #undef TEST_RANGE_AND 537 #undef TEST_RANGE_AND
539 } 538 }
540 539
541 540
542 TEST_CASE(RangeIntersectionMinMax) { 541 TEST_CASE(RangeIntersectionMinMax) {
543 // Test IntersectionMin and IntersectionMax methods which for constants are 542 // Test IntersectionMin and IntersectionMax methods which for constants are
544 // simply defined as Max/Min respectively. 543 // simply defined as Max/Min respectively.
545 544
546 // Constants. 545 // Constants.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 p_infinity, 696 p_infinity,
698 size).IsMaximumOrAbove(size)); 697 size).IsMaximumOrAbove(size));
699 698
700 EXPECT(RangeBoundary::JoinMax( 699 EXPECT(RangeBoundary::JoinMax(
701 p_infinity, 700 p_infinity,
702 RangeBoundary::FromConstant(1), 701 RangeBoundary::FromConstant(1),
703 size).IsMaximumOrAbove(size)); 702 size).IsMaximumOrAbove(size));
704 } 703 }
705 704
706 } // namespace dart 705 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698