aboutsummaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-13 02:33:34 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-13 02:33:34 +0000
commit689ad6ef3fd2e89394f1e8860dfebfe56b73c3da (patch)
tree8f87f91f4fabaf5a9ce4c06a2896b634cd162cd3 /unittests
parent28865062c1ef60e47f0ac23a5ebc22eaf0d1b184 (diff)
downloadexternal_llvm-689ad6ef3fd2e89394f1e8860dfebfe56b73c3da.zip
external_llvm-689ad6ef3fd2e89394f1e8860dfebfe56b73c3da.tar.gz
external_llvm-689ad6ef3fd2e89394f1e8860dfebfe56b73c3da.tar.bz2
Convert APint::{fromString,APInt,getBitsNeeded} to use StringRef.
- Patch by Erick Tryzelaar, with some edits (and a bug fix) from me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ADT/APIntTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/unittests/ADT/APIntTest.cpp b/unittests/ADT/APIntTest.cpp
index 648faf1..4a6b176 100644
--- a/unittests/ADT/APIntTest.cpp
+++ b/unittests/ADT/APIntTest.cpp
@@ -164,12 +164,12 @@ TEST(APIntTest, i1) {
}
TEST(APIntTest, fromString) {
- EXPECT_EQ(APInt(1, 0), APInt(1, "0", 1, 10));
- EXPECT_EQ(APInt(1, 1), APInt(1, "1", 1, 10));
- EXPECT_EQ(APInt(1, 1), APInt(1, "-1", 2, 10));
- EXPECT_EQ(APInt(1, 1), APInt(1, "1", 1, 2));
- EXPECT_EQ(APInt(1, 1), APInt(1, "1", 1, 8));
- EXPECT_EQ(APInt(1, 1), APInt(1, "1", 1, 16));
+ EXPECT_EQ(APInt(1, 0), APInt(1, "0", 10));
+ EXPECT_EQ(APInt(1, 1), APInt(1, "1", 10));
+ EXPECT_EQ(APInt(1, 1), APInt(1, "-1", 10));
+ EXPECT_EQ(APInt(1, 1), APInt(1, "1", 2));
+ EXPECT_EQ(APInt(1, 1), APInt(1, "1", 8));
+ EXPECT_EQ(APInt(1, 1), APInt(1, "1", 16));
}
}