| 32 | namespace csv { |
| 33 | |
| 34 | void AssertChunkSize(Chunker& chunker, const std::string& str, uint32_t chunk_size) { |
| 35 | std::shared_ptr<Buffer> block, whole, partial; |
| 36 | block = std::make_shared<Buffer>(reinterpret_cast<const uint8_t*>(str.data()), |
| 37 | static_cast<int64_t>(str.size())); |
| 38 | ASSERT_OK(chunker.Process(block, &whole, &partial)); |
| 39 | ASSERT_EQ(block->size(), whole->size() + partial->size()); |
| 40 | auto actual_chunk_size = static_cast<uint32_t>(whole->size()); |
| 41 | ASSERT_EQ(actual_chunk_size, chunk_size); |
| 42 | } |
| 43 | |
| 44 | template <typename IntContainer> |
| 45 | void AssertChunking(Chunker& chunker, const std::string& str, |
no test coverage detected