test
test copied to clipboard
Comparing resulting files
It would be nice and cozy to have a macro for file result comparision.
A potential body for the file comparision test macro:
std::ifstream ifs1(TEST_SRC_DIR "input/file/path");
std::ifstream ifs2(TEST_SRC_DIR "gold/file/path");
std::istream_iterator<char> b1(ifs1), b2(ifs2), e;
BOOST_CHECK_EQUAL_COLLECTIONS(b1, e, b2, e);
There is already something close to what you are asking: https://www.boost.org/doc/libs/1_78_0/libs/test/doc/html/boost_test/testing_tools/output_stream_testing.html . We need to polish it a bit and/or document it better.
Would this work for you? What do you think of that feature?