diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-12-13 22:00:19 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-12-13 22:00:19 +0000 |
commit | cadf450e175fa6b65e28dcbb1f41d9c1bcf6b85a (patch) | |
tree | d57ea0a95020c0a60611fdc9ed0785b873cdd919 /unittests | |
parent | 5c9e0e52dab3095291771fba1e63c287d298361b (diff) | |
download | llvm-cadf450e175fa6b65e28dcbb1f41d9c1bcf6b85a.tar.gz llvm-cadf450e175fa6b65e28dcbb1f41d9c1bcf6b85a.tar.bz2 llvm-cadf450e175fa6b65e28dcbb1f41d9c1bcf6b85a.tar.xz |
Remove APInt::extractBit since it is already implemented via operator[]. Change tests for extractBit to test operator[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ADT/APIntTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/ADT/APIntTest.cpp b/unittests/ADT/APIntTest.cpp index 36cbd868a2..5043aa0eec 100644 --- a/unittests/ADT/APIntTest.cpp +++ b/unittests/ADT/APIntTest.cpp @@ -598,13 +598,13 @@ TEST(APIntTest, tcDecrement) { } } -TEST(APIntTest, extractBit) { +TEST(APIntTest, arrayAccess) { // Single word check. uint64_t E1 = 0x2CA7F46BF6569915ULL; APInt A1(64, E1); for (unsigned i = 0, e = 64; i < e; ++i) { EXPECT_EQ(bool(E1 & (1ULL << i)), - A1.extractBit(i)); + A1[i]); } // Multiword check. @@ -618,7 +618,7 @@ TEST(APIntTest, extractBit) { for (unsigned i = 0; i < 4; ++i) { for (unsigned j = 0; j < integerPartWidth; ++j) { EXPECT_EQ(bool(E2[i] & (1ULL << j)), - A2.extractBit(i*integerPartWidth + j)); + A2[i*integerPartWidth + j]); } } } |