Pacify the compiler (signed with unsigned comparison) by making

these constants unsigned.

llvm-svn: 83962
This commit is contained in:
Duncan Sands 2009-10-13 09:23:11 +00:00
parent 9bc890425a
commit f7ad620c62
1 changed files with 6 additions and 6 deletions

View File

@ -316,14 +316,14 @@ TEST(APIntTest, StringBitsNeeded16) {
}
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);
}