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

Unified Diff: runtime/vm/utils_test.cc

Issue 23604024: Fix a compiler bug caused by Utils::IsPowerOfTwo treating zero as a power of two. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | tests/language/vm/if_conversion_vm_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/utils_test.cc
===================================================================
--- runtime/vm/utils_test.cc (revision 27015)
+++ runtime/vm/utils_test.cc (working copy)
@@ -39,7 +39,7 @@
UNIT_TEST_CASE(IsPowerOfTwo) {
- EXPECT(Utils::IsPowerOfTwo(0));
+ EXPECT(!Utils::IsPowerOfTwo(0));
EXPECT(Utils::IsPowerOfTwo(1));
EXPECT(Utils::IsPowerOfTwo(2));
EXPECT(!Utils::IsPowerOfTwo(3));
@@ -59,7 +59,6 @@
UNIT_TEST_CASE(IsAligned) {
- EXPECT(Utils::IsAligned(0, 0));
EXPECT(Utils::IsAligned(0, 1));
EXPECT(Utils::IsAligned(1, 1));
@@ -74,7 +73,6 @@
UNIT_TEST_CASE(RoundDown) {
- EXPECT_EQ(0, Utils::RoundDown(0, 0));
EXPECT_EQ(0, Utils::RoundDown(22, 32));
EXPECT_EQ(32, Utils::RoundDown(33, 32));
EXPECT_EQ(32, Utils::RoundDown(63, 32));
@@ -85,8 +83,6 @@
UNIT_TEST_CASE(RoundUp) {
- EXPECT_EQ(0, Utils::RoundUp(0, 0));
- EXPECT_EQ(0, Utils::RoundUp(1, 0));
EXPECT_EQ(32, Utils::RoundUp(22, 32));
EXPECT_EQ(64, Utils::RoundUp(33, 32));
EXPECT_EQ(64, Utils::RoundUp(63, 32));
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | tests/language/vm/if_conversion_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698