blob: cbc6623794d0c73289ce59c5b506ffb774d21206 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include "helpers.h"
#include <fstream>
#include <boost/test/test_tools.hpp>
void
diff(const std::filesystem::path & left, const std::filesystem::path & right)
{
std::ifstream fl(left.string());
std::ifstream fr(right.string());
std::string l, r;
std::copy_if(std::istreambuf_iterator<char>(fl), std::istreambuf_iterator<char>(), back_inserter(l), [](char x){ return !isspace(x); });
std::copy_if(std::istreambuf_iterator<char>(fr), std::istreambuf_iterator<char>(), back_inserter(r), [](char x){ return !isspace(x); });
BOOST_REQUIRE_EQUAL(l, r);
}
|