| 9 | namespace { |
| 10 | |
| 11 | void WriteDummyFile(const char *name, std::uintmax_t size) |
| 12 | { |
| 13 | std::ofstream test_file(name, std::ios::out | std::ios::trunc | std::ios::binary); |
| 14 | ASSERT_FALSE(test_file.fail()); |
| 15 | const char c = '\0'; |
| 16 | for (std::uintmax_t i = 0; i < size; ++i) { |
| 17 | test_file.write(&c, 1); |
| 18 | ASSERT_FALSE(test_file.fail()); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | std::string GetTmpPathName(const char *suffix = ".tmp") |
| 23 | { |