MCPcopy Create free account
hub / github.com/apache/arrow / TEST_F

Function TEST_F

cpp/src/arrow/util/bit_block_counter_test.cc:53–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51static constexpr int64_t kWordSize = 64;
52
53TEST_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
72TEST_F(TestBitBlockCounter, FourWordsBasics) {
73 const int64_t nbytes = 1024;

Callers

nothing calls this directly

Calls 8

SetBitToFunction · 0.70
SetBitsToFunction · 0.70
CountSetBitsFunction · 0.70
AllocateBufferFunction · 0.50
random_bytesFunction · 0.50
NextWordMethod · 0.45
mutable_dataMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected