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

Function TEST

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

Source from the content-addressed store, hash-verified

119// Tests for BitmapReader.
120
121TEST(BitmapReader, NormalOperation) {
122 std::shared_ptr<Buffer> buffer;
123 int64_t length;
124
125 for (int64_t offset : {0, 1, 3, 5, 7, 8, 12, 13, 21, 38, 75, 120}) {
126 BitmapFromVector({0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1}, offset, &buffer,
127 &length);
128 ASSERT_EQ(length, 14);
129
130 auto reader = BitmapReader(buffer->mutable_data(), offset, length);
131 ASSERT_READER_VALUES(reader, {0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1});
132 }
133}
134
135TEST(BitmapReader, DoesNotReadOutOfBounds) {
136 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
WrapFunction · 0.85
SliceBufferFunction · 0.85
VisitWordsFunction · 0.85
push_backMethod · 0.80
backMethod · 0.80
AppendWordMethod · 0.80
BitmapFromVectorFunction · 0.70

Tested by

no test coverage detected