[llvm-commits] [llvm] r81752 - /llvm/trunk/unittests/ADT/APIntTest.cpp
Daniel Dunbar
daniel at zuster.org
Sun Sep 13 19:38:53 PDT 2009
Author: ddunbar
Date: Sun Sep 13 21:38:53 2009
New Revision: 81752
URL: http://llvm.org/viewvc/llvm-project?rev=81752&view=rev
Log:
Attempt to fix some 4.0.0 build warnings.
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=81752&r1=81751&r2=81752&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/APIntTest.cpp (original)
+++ llvm/trunk/unittests/ADT/APIntTest.cpp Sun Sep 13 21:38:53 2009
@@ -175,11 +175,11 @@
EXPECT_EQ(APInt(32, 3), APInt(32, "+11", 2));
EXPECT_EQ(APInt(32, 4), APInt(32, "+100", 2));
- EXPECT_EQ(APInt(32, -0), APInt(32, "-0", 2));
- EXPECT_EQ(APInt(32, -1), APInt(32, "-1", 2));
- EXPECT_EQ(APInt(32, -2), APInt(32, "-10", 2));
- EXPECT_EQ(APInt(32, -3), APInt(32, "-11", 2));
- EXPECT_EQ(APInt(32, -4), APInt(32, "-100", 2));
+ EXPECT_EQ(APInt(32, -0LL), APInt(32, "-0", 2));
+ EXPECT_EQ(APInt(32, -1LL), APInt(32, "-1", 2));
+ EXPECT_EQ(APInt(32, -2LL), APInt(32, "-10", 2));
+ EXPECT_EQ(APInt(32, -3LL), APInt(32, "-11", 2));
+ EXPECT_EQ(APInt(32, -4LL), APInt(32, "-100", 2));
EXPECT_EQ(APInt(32, 0), APInt(32, "0", 8));
@@ -196,12 +196,12 @@
EXPECT_EQ(APInt(32, +15), APInt(32, "+17", 8));
EXPECT_EQ(APInt(32, +16), APInt(32, "+20", 8));
- EXPECT_EQ(APInt(32, -0), APInt(32, "-0", 8));
- EXPECT_EQ(APInt(32, -1), APInt(32, "-1", 8));
- EXPECT_EQ(APInt(32, -7), APInt(32, "-7", 8));
- EXPECT_EQ(APInt(32, -8), APInt(32, "-10", 8));
- EXPECT_EQ(APInt(32, -15), APInt(32, "-17", 8));
- EXPECT_EQ(APInt(32, -16), APInt(32, "-20", 8));
+ EXPECT_EQ(APInt(32, -0LL), APInt(32, "-0", 8));
+ EXPECT_EQ(APInt(32, -1LL), APInt(32, "-1", 8));
+ EXPECT_EQ(APInt(32, -7LL), APInt(32, "-7", 8));
+ EXPECT_EQ(APInt(32, -8LL), APInt(32, "-10", 8));
+ EXPECT_EQ(APInt(32, -15LL), APInt(32, "-17", 8));
+ EXPECT_EQ(APInt(32, -16LL), APInt(32, "-20", 8));
EXPECT_EQ(APInt(32, 0), APInt(32, "0", 10));
@@ -211,12 +211,12 @@
EXPECT_EQ(APInt(32, 19), APInt(32, "19", 10));
EXPECT_EQ(APInt(32, 20), APInt(32, "20", 10));
- EXPECT_EQ(APInt(32, -0), APInt(32, "-0", 10));
- EXPECT_EQ(APInt(32, -1), APInt(32, "-1", 10));
- EXPECT_EQ(APInt(32, -9), APInt(32, "-9", 10));
- EXPECT_EQ(APInt(32, -10), APInt(32, "-10", 10));
- EXPECT_EQ(APInt(32, -19), APInt(32, "-19", 10));
- EXPECT_EQ(APInt(32, -20), APInt(32, "-20", 10));
+ EXPECT_EQ(APInt(32, -0LL), APInt(32, "-0", 10));
+ EXPECT_EQ(APInt(32, -1LL), APInt(32, "-1", 10));
+ EXPECT_EQ(APInt(32, -9LL), APInt(32, "-9", 10));
+ EXPECT_EQ(APInt(32, -10LL), APInt(32, "-10", 10));
+ EXPECT_EQ(APInt(32, -19LL), APInt(32, "-19", 10));
+ EXPECT_EQ(APInt(32, -20LL), APInt(32, "-20", 10));
EXPECT_EQ(APInt(32, 0), APInt(32, "0", 16));
@@ -226,12 +226,12 @@
EXPECT_EQ(APInt(32, 31), APInt(32, "1F", 16));
EXPECT_EQ(APInt(32, 32), APInt(32, "20", 16));
- EXPECT_EQ(APInt(32, -0), APInt(32, "-0", 16));
- EXPECT_EQ(APInt(32, -1), APInt(32, "-1", 16));
- EXPECT_EQ(APInt(32, -15), APInt(32, "-F", 16));
- EXPECT_EQ(APInt(32, -16), APInt(32, "-10", 16));
- EXPECT_EQ(APInt(32, -31), APInt(32, "-1F", 16));
- EXPECT_EQ(APInt(32, -32), APInt(32, "-20", 16));
+ EXPECT_EQ(APInt(32, -0LL), APInt(32, "-0", 16));
+ EXPECT_EQ(APInt(32, -1LL), APInt(32, "-1", 16));
+ EXPECT_EQ(APInt(32, -15LL), APInt(32, "-F", 16));
+ EXPECT_EQ(APInt(32, -16LL), APInt(32, "-10", 16));
+ EXPECT_EQ(APInt(32, -31LL), APInt(32, "-1F", 16));
+ EXPECT_EQ(APInt(32, -32LL), APInt(32, "-20", 16));
}
TEST(APIntTest, StringBitsNeeded2) {
More information about the llvm-commits
mailing list