| 187 | } |
| 188 | |
| 189 | void verify_file(const fs::path& ph, const std::string& expected) |
| 190 | { |
| 191 | std::ifstream f(BOOST_FILESYSTEM_C_STR(ph)); |
| 192 | if (!f) |
| 193 | throw fs::filesystem_error("operations_test verify_file", ph, error_code(errno, system_category())); |
| 194 | std::string contents; |
| 195 | f >> contents; |
| 196 | if (contents != expected) |
| 197 | throw fs::filesystem_error("operations_test verify_file contents \"" + contents + "\" != \"" + expected + "\"", ph, error_code()); |
| 198 | } |
| 199 | |
| 200 | template< typename F > |
| 201 | bool throws_fs_error(F func, errno_t en, int line) |
no outgoing calls
no test coverage detected