| 100 | } |
| 101 | |
| 102 | TEST(ByteRleEncoder, random_chars) { |
| 103 | MemoryOutputStream memStream(DEFAULT_MEM_STREAM_SIZE); |
| 104 | MemoryPool* pool = getDefaultPool(); |
| 105 | |
| 106 | uint64_t capacity = 500 * 1024; |
| 107 | uint64_t block = 1024; |
| 108 | |
| 109 | auto outStream = |
| 110 | std::make_unique<BufferedOutputStream>(*pool, &memStream, capacity, block, nullptr); |
| 111 | |
| 112 | std::unique_ptr<ByteRleEncoder> encoder = createByteRleEncoder(std::move(outStream)); |
| 113 | |
| 114 | char* data = new char[102400]; |
| 115 | generateData(102400, data); |
| 116 | encoder->add(data, 102400, nullptr); |
| 117 | encoder->flush(); |
| 118 | |
| 119 | decodeAndVerify(memStream, data, 102400, nullptr); |
| 120 | delete[] data; |
| 121 | } |
| 122 | |
| 123 | TEST(ByteRleEncoder, random_chars_with_null) { |
| 124 | MemoryOutputStream memStream(DEFAULT_MEM_STREAM_SIZE); |
nothing calls this directly
no test coverage detected