[llvm-commits] [llvm] r83962 - /llvm/trunk/unittests/ADT/APIntTest.cpp
Duncan Sands
baldrick at free.fr
Tue Oct 13 02:23:12 PDT 2009
Author: baldrick
Date: Tue Oct 13 04:23:11 2009
New Revision: 83962
URL: http://llvm.org/viewvc/llvm-project?rev=83962&view=rev
Log:
Pacify the compiler (signed with unsigned comparison) by making
these constants unsigned.
Modified:
llvm/trunk/unittests/ADT/APIntTest.cpp
Modified: llvm/trunk/unittests/ADT/APIntTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/APIntTest.cpp?rev=83962&r1=83961&r2=83962&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/APIntTest.cpp (original)
+++ llvm/trunk/unittests/ADT/APIntTest.cpp Tue Oct 13 04:23:11 2009
@@ -316,14 +316,14 @@
}
TEST(APIntTest, Log2) {
- EXPECT_EQ(APInt(15, 7).logBase2(), 2);
- EXPECT_EQ(APInt(15, 7).ceilLogBase2(), 3);
+ EXPECT_EQ(APInt(15, 7).logBase2(), 2U);
+ EXPECT_EQ(APInt(15, 7).ceilLogBase2(), 3U);
EXPECT_EQ(APInt(15, 7).exactLogBase2(), -1);
- EXPECT_EQ(APInt(15, 8).logBase2(), 3);
- EXPECT_EQ(APInt(15, 8).ceilLogBase2(), 3);
+ EXPECT_EQ(APInt(15, 8).logBase2(), 3U);
+ EXPECT_EQ(APInt(15, 8).ceilLogBase2(), 3U);
EXPECT_EQ(APInt(15, 8).exactLogBase2(), 3);
- EXPECT_EQ(APInt(15, 9).logBase2(), 3);
- EXPECT_EQ(APInt(15, 9).ceilLogBase2(), 4);
+ EXPECT_EQ(APInt(15, 9).logBase2(), 3U);
+ EXPECT_EQ(APInt(15, 9).ceilLogBase2(), 4U);
EXPECT_EQ(APInt(15, 9).exactLogBase2(), -1);
}
More information about the llvm-commits
mailing list