MCPcopy Create free account
hub / github.com/boostorg/filesystem / verify_file

Function verify_file

test/operations_test.cpp:189–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189void 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
200template< typename F >
201bool throws_fs_error(F func, errno_t en, int line)

Callers 4

create_treeFunction · 0.70
rename_testsFunction · 0.70
copy_file_testsFunction · 0.70
write_time_testsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected