| 21 | namespace gandiva { |
| 22 | |
| 23 | TEST(TestBitMap, TestSimple) { |
| 24 | static const int kNumBytes = 16; |
| 25 | uint8_t bit_map[kNumBytes]; |
| 26 | memset(bit_map, 0, kNumBytes); |
| 27 | |
| 28 | EXPECT_EQ(bitMapGetBit(bit_map, 100), false); |
| 29 | |
| 30 | // set 100th bit and verify |
| 31 | bitMapSetBit(bit_map, 100, true); |
| 32 | EXPECT_EQ(bitMapGetBit(bit_map, 100), true); |
| 33 | |
| 34 | // clear 100th bit and verify |
| 35 | bitMapSetBit(bit_map, 100, false); |
| 36 | EXPECT_EQ(bitMapGetBit(bit_map, 100), false); |
| 37 | } |
| 38 | |
| 39 | TEST(TestBitMap, TestClearIfFalse) { |
| 40 | static const int kNumBytes = 32; |
nothing calls this directly
no test coverage detected