| 50 | } |
| 51 | |
| 52 | void GenerateOrigFile(size_t size) { |
| 53 | ScopedFileHandle write_handle(OpenFileForWrite( |
| 54 | orig_, FileWriteMode::kCreateOrFail, FilePermissions::kOwnerOnly)); |
| 55 | ASSERT_TRUE(write_handle.is_valid()); |
| 56 | FileOutputStream out(write_handle.get()); |
| 57 | const uint8_t* buf = BuildDeterministicInput(size); |
| 58 | while (size > 0) { |
| 59 | size_t m = std::min(kBufferSize, size); |
| 60 | ASSERT_TRUE(out.Write(buf, m)); |
| 61 | size -= m; |
| 62 | buf += m; |
| 63 | } |
| 64 | ASSERT_TRUE(out.Flush()); |
| 65 | } |
| 66 | |
| 67 | FileEncoder* encoder() const { return encoder_.get(); } |
| 68 |
nothing calls this directly
no test coverage detected