|
@@ -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]);
|
|
|
}
|
|
|
}
|
|
|
}
|