| 294 | class RleRunToBitmapDecoderTest : public ::testing::TestWithParam<rle_size_t> {}; |
| 295 | |
| 296 | TEST_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 | |
| 316 | INSTANTIATE_TEST_SUITE_P( // |
| 317 | RleBitmap, RleRunToBitmapDecoderTest, |
nothing calls this directly
no test coverage detected