fixed files_equal for new unit testWrap setup
parent
2bba5824fa
commit
03efd69079
|
@ -29,10 +29,10 @@ string file_contents(const string& filename, bool skipheader) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
bool files_equal(const string& actual, const string& expected, bool skipheader) {
|
bool files_equal(const string& expected, const string& actual, bool skipheader) {
|
||||||
try {
|
try {
|
||||||
|
string expected_contents = file_contents(expected, skipheader);
|
||||||
string actual_contents = file_contents(actual, skipheader);
|
string actual_contents = file_contents(actual, skipheader);
|
||||||
string expected_contents = file_contents(expected);
|
|
||||||
bool equal = actual_contents == expected_contents;
|
bool equal = actual_contents == expected_contents;
|
||||||
if (!equal) {
|
if (!equal) {
|
||||||
stringstream command;
|
stringstream command;
|
||||||
|
|
|
@ -41,7 +41,7 @@ std::string file_contents(const std::string& filename, bool skipheader=false);
|
||||||
* Check whether two files are equal
|
* Check whether two files are equal
|
||||||
* By default, skips the first line of actual so header is not generated
|
* By default, skips the first line of actual so header is not generated
|
||||||
*/
|
*/
|
||||||
bool files_equal(const std::string& actual, const std::string& expected, bool skipheader=true);
|
bool files_equal(const std::string& expected, const std::string& actual, bool skipheader=true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* emit a header at the top of generated files
|
* emit a header at the top of generated files
|
||||||
|
|
Loading…
Reference in New Issue