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

Function TEST

cpp/src/arrow/util/bitmap_test.cc:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120// Tests for BitmapReader.
121
122TEST(BitmapReader, NormalOperation) {
123 std::shared_ptr<Buffer> buffer;
124 int64_t length;
125
126 for (int64_t offset : {0, 1, 3, 5, 7, 8, 12, 13, 21, 38, 75, 120}) {
127 BitmapFromVector({0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1}, offset, &buffer,
128 &length);
129 ASSERT_EQ(length, 14);
130
131 auto reader = BitmapReader(buffer->mutable_data(), offset, length);
132 ASSERT_READER_VALUES(reader, {0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1});
133 }
134}
135
136TEST(BitmapReader, DoesNotReadOutOfBounds) {
137 uint8_t bitmap[16] = {0};

Callers

nothing calls this directly

Calls 15

ASSERT_READER_VALUESFunction · 0.85
WriteVectorToWriterFunction · 0.85
AssertBytesEqualFunction · 0.85
to_stringFunction · 0.85
BitmapAndFunction · 0.85
default_memory_poolFunction · 0.85
WrapFunction · 0.85
SliceBufferFunction · 0.85
VisitWordsFunction · 0.85
push_backMethod · 0.80
backMethod · 0.80
AppendWordMethod · 0.80

Tested by

no test coverage detected