[llvm-commits] [llvm] r68258 - /llvm/trunk/unittests/Support/MathExtrasTest.cpp
Bill Wendling
isanbard at gmail.com
Wed Apr 1 15:44:19 PDT 2009
Author: void
Date: Wed Apr 1 17:44:18 2009
New Revision: 68258
URL: http://llvm.org/viewvc/llvm-project?rev=68258&view=rev
Log:
Make the constants fit.
Modified:
llvm/trunk/unittests/Support/MathExtrasTest.cpp
Modified: llvm/trunk/unittests/Support/MathExtrasTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/MathExtrasTest.cpp?rev=68258&r1=68257&r2=68258&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/MathExtrasTest.cpp (original)
+++ llvm/trunk/unittests/Support/MathExtrasTest.cpp Wed Apr 1 17:44:18 2009
@@ -25,7 +25,7 @@
EXPECT_TRUE(isPowerOf2_64(1LL << 46));
EXPECT_TRUE(isPowerOf2_64(1LL << 12));
EXPECT_FALSE(isPowerOf2_64((1LL << 53) + 3));
- EXPECT_FALSE(isPowerOf2_64(0xABCDEF0ABCDEF0));
+ EXPECT_FALSE(isPowerOf2_64(0xABCDEF0ABCDEF0LL));
}
TEST(MathExtras, ByteSwap_32) {
@@ -34,8 +34,8 @@
}
TEST(MathExtras, ByteSwap_64) {
- EXPECT_EQ(0x8877665544332211ULL, ByteSwap_64(0x1122334455667788));
- EXPECT_EQ(0x1100FFEEDDCCBBAAULL, ByteSwap_64(0xAABBCCDDEEFF0011));
+ EXPECT_EQ(0x8877665544332211ULL, ByteSwap_64(0x1122334455667788LL));
+ EXPECT_EQ(0x1100FFEEDDCCBBAAULL, ByteSwap_64(0xAABBCCDDEEFF0011LL));
}
TEST(MathExtras, CountLeadingZeros_32) {
@@ -47,7 +47,7 @@
}
TEST(MathExtras, CountLeadingZeros_64) {
- EXPECT_EQ(8u, CountLeadingZeros_64(0x00F1234500F12345));
+ EXPECT_EQ(8u, CountLeadingZeros_64(0x00F1234500F12345LL));
EXPECT_EQ(1u, CountLeadingZeros_64(1LL << 62));
for (unsigned i = 0; i <= 62; ++i) {
EXPECT_EQ(63 - i, CountLeadingZeros_64(1LL << i));
@@ -64,7 +64,7 @@
TEST(MathExtras, CountLeadingOnes_64) {
for (int i = 62; i >= 0; --i) {
// Start with all ones and unset some bit.
- EXPECT_EQ(63u - i, CountLeadingOnes_64(0xFFFFFFFFFFFFFFFF ^ (1LL << i)));
+ EXPECT_EQ(63u - i, CountLeadingOnes_64(0xFFFFFFFFFFFFFFFFLL ^ (1LL << i)));
}
for (int i = 30; i >= 0; --i) {
// Start with all ones and unset some bit.
More information about the llvm-commits
mailing list