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

Function TEST_P

cpp/src/arrow/util/rle_bitmap_test.cc:296–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294class RleRunToBitmapDecoderTest : public ::testing::TestWithParam<rle_size_t> {};
295
296TEST_P(RleRunToBitmapDecoderTest, Decode) {
297 const auto& count = GetParam();
298
299 // Only two possible repeated value
300 for (bool value : {true, false}) {
301 ARROW_SCOPED_TRACE("value = ", value);
302
303 // A boolean RLE run stores its value in a single (1-bit-wide) byte.
304 const uint8_t data = value ? 1 : 0;
305 const auto run = RleRun(&data, count, /*value_bit_width=*/1);
306
307 // value() reports the repeated boolean.
308 RleRunToBitmapDecoder decoder(run);
309 EXPECT_EQ(decoder.value(), value);
310
311 const std::vector<bool> expected(count, value);
312 CheckBitmapDecoder<RleRunToBitmapDecoder>(run, expected);
313 }
314}
315
316INSTANTIATE_TEST_SUITE_P( //
317 RleBitmap, RleRunToBitmapDecoderTest,

Callers

nothing calls this directly

Calls 7

RleRunClass · 0.85
BytesForBitsFunction · 0.85
BitPackedRunClass · 0.85
BitsFromBytesFunction · 0.85
valueMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected