| 38 | } |
| 39 | |
| 40 | void verify_file(fs::path const& ph, std::string const& expected) |
| 41 | { |
| 42 | std::ifstream f(BOOST_FILESYSTEM_C_STR(ph)); |
| 43 | if (!f) |
| 44 | BOOST_THROW_EXCEPTION(std::runtime_error("Failed to open file: " + ph.string())); |
| 45 | std::string contents; |
| 46 | f >> contents; |
| 47 | BOOST_TEST_EQ(contents, expected); |
| 48 | if (contents != expected) |
| 49 | { |
| 50 | BOOST_THROW_EXCEPTION(std::runtime_error("verify_file failed: contents \"" + contents + "\" != \"" + expected + "\" in " + ph.string())); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | fs::path create_tree() |
| 55 | { |
no test coverage detected