Pacify the compiler (signed with unsigned comparison) by making

these constants unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83962 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands 2009-10-13 09:23:11 +00:00
parent 321333e51e
commit 937708cea9

View File

@ -316,14 +316,14 @@ TEST(APIntTest, StringBitsNeeded16) {
} }
TEST(APIntTest, Log2) { TEST(APIntTest, Log2) {
EXPECT_EQ(APInt(15, 7).logBase2(), 2); EXPECT_EQ(APInt(15, 7).logBase2(), 2U);
EXPECT_EQ(APInt(15, 7).ceilLogBase2(), 3); EXPECT_EQ(APInt(15, 7).ceilLogBase2(), 3U);
EXPECT_EQ(APInt(15, 7).exactLogBase2(), -1); EXPECT_EQ(APInt(15, 7).exactLogBase2(), -1);
EXPECT_EQ(APInt(15, 8).logBase2(), 3); EXPECT_EQ(APInt(15, 8).logBase2(), 3U);
EXPECT_EQ(APInt(15, 8).ceilLogBase2(), 3); EXPECT_EQ(APInt(15, 8).ceilLogBase2(), 3U);
EXPECT_EQ(APInt(15, 8).exactLogBase2(), 3); EXPECT_EQ(APInt(15, 8).exactLogBase2(), 3);
EXPECT_EQ(APInt(15, 9).logBase2(), 3); EXPECT_EQ(APInt(15, 9).logBase2(), 3U);
EXPECT_EQ(APInt(15, 9).ceilLogBase2(), 4); EXPECT_EQ(APInt(15, 9).ceilLogBase2(), 4U);
EXPECT_EQ(APInt(15, 9).exactLogBase2(), -1); EXPECT_EQ(APInt(15, 9).exactLogBase2(), -1);
} }