From 03efd690790df5929faa3aef89914bdf4fc87b53 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Tue, 23 Feb 2010 14:54:28 +0000 Subject: [PATCH] fixed files_equal for new unit testWrap setup --- wrap/utilities.cpp | 4 ++-- wrap/utilities.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wrap/utilities.cpp b/wrap/utilities.cpp index c41b0c06e..ff244e042 100644 --- a/wrap/utilities.cpp +++ b/wrap/utilities.cpp @@ -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; diff --git a/wrap/utilities.h b/wrap/utilities.h index be7da3c23..d2a1b5727 100644 --- a/wrap/utilities.h +++ b/wrap/utilities.h @@ -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