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

Function TEST_P

cpp/src/arrow/util/compression_test.cc:353–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353TEST_P(CodecTest, CodecRoundtrip) {
354 const auto compression = GetCompression();
355 if (compression == Compression::BZ2) {
356 GTEST_SKIP() << "BZ2 does not support one-shot compression";
357 }
358
359 int sizes[] = {0, 10000, 100000};
360
361 // create multiple compressors to try to break them
362 std::unique_ptr<Codec> c1, c2;
363 ASSERT_OK_AND_ASSIGN(c1, Codec::Create(compression));
364 ASSERT_OK_AND_ASSIGN(c2, Codec::Create(compression));
365
366 for (int data_size : sizes) {
367 std::vector<uint8_t> data = MakeRandomData(data_size);
368 CheckCodecRoundtrip(c1, c2, data);
369
370 data = MakeCompressibleData(data_size);
371 CheckCodecRoundtrip(c1, c2, data);
372 }
373}
374
375TEST(CodecTest, CodecRoundtripGzipMembers) {
376#ifndef ARROW_WITH_ZLIB

Callers

nothing calls this directly

Calls 15

GetCompressionFunction · 0.85
CheckCodecRoundtripFunction · 0.85
CheckStreamingCompressorFunction · 0.85
CheckStreamingRoundtripFunction · 0.85
resizeMethod · 0.80
strMethod · 0.80
ASSERT_OK_AND_ASSIGNFunction · 0.70
MakeRandomDataFunction · 0.70
MakeCompressibleDataFunction · 0.70

Tested by

no test coverage detected