| 111 | } |
| 112 | |
| 113 | void RleTest::runExampleTest(int64_t* inputData, uint64_t inputLength, |
| 114 | unsigned char* expectedOutput, uint64_t outputLength) { |
| 115 | MemoryOutputStream memStream(DEFAULT_MEM_STREAM_SIZE); |
| 116 | |
| 117 | std::unique_ptr<RleEncoder> encoder = getEncoder(RleVersion_2, memStream, false); |
| 118 | |
| 119 | encoder->add(inputData, inputLength, nullptr); |
| 120 | encoder->flush(); |
| 121 | const char* output = memStream.getData(); |
| 122 | for (int i = 0; i < outputLength; i++) { |
| 123 | EXPECT_EQ(expectedOutput[i], static_cast<unsigned char>(output[i])); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | void RleTest::runTest(RleVersion version, uint64_t numValues, int64_t start, int64_t delta, |
| 128 | bool random, bool isSigned, uint64_t numNulls) { |