I understand that in my unit test I should do
BOOST_TEST_MESSAGE("message");
instead of
std::cout << "message";
but what if for a function that's expecting std::ostream& ?
so instead of
hexdump(std::cout, buffer, length);
what should I replace std::cout with?
If you want to test the hexdump function you can pass in a std::ostringstream instead.