fixed files_equal for new unit testWrap setup

release/4.3a0
Frank Dellaert 2010-02-23 14:54:28 +00:00
parent 2bba5824fa
commit 03efd69079
2 changed files with 3 additions and 3 deletions

View File

@ -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 {
string expected_contents = file_contents(expected, skipheader);
string actual_contents = file_contents(actual, skipheader);
string expected_contents = file_contents(expected);
bool equal = actual_contents == expected_contents;
if (!equal) {
stringstream command;

View File

@ -41,7 +41,7 @@ std::string file_contents(const std::string& filename, bool skipheader=false);
* Check whether two files are equal
* 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