| 51 | static constexpr int64_t kWordSize = 64; |
| 52 | |
| 53 | TEST_F(TestBitBlockCounter, OneWordBasics) { |
| 54 | const int64_t nbytes = 1024; |
| 55 | |
| 56 | Create(nbytes, 0, nbytes * 8); |
| 57 | |
| 58 | int64_t bits_scanned = 0; |
| 59 | for (int64_t i = 0; i < nbytes / 8; ++i) { |
| 60 | BitBlockCount block = counter_->NextWord(); |
| 61 | ASSERT_EQ(block.length, kWordSize); |
| 62 | ASSERT_EQ(block.popcount, 0); |
| 63 | bits_scanned += block.length; |
| 64 | } |
| 65 | ASSERT_EQ(bits_scanned, 1024 * 8); |
| 66 | |
| 67 | auto block = counter_->NextWord(); |
| 68 | ASSERT_EQ(block.length, 0); |
| 69 | ASSERT_EQ(block.popcount, 0); |
| 70 | } |
| 71 | |
| 72 | TEST_F(TestBitBlockCounter, FourWordsBasics) { |
| 73 | const int64_t nbytes = 1024; |
nothing calls this directly
no test coverage detected