36 #ifndef ABSTRACTFILECOMPARISON_HPP_ 37 #define ABSTRACTFILECOMPARISON_HPP_ 40 #include "FileFinder.hpp" 41 #include "OutputFileHandler.hpp" 62 bool calledCollectively,
82 std::string fileName2,
83 bool calledCollectively,
135 mpFile1->open(mFilename1.c_str());
136 mpFile2->open(mFilename2.c_str());
149 for (
unsigned line_number=0; line_number<numLinesToSkip; line_number++)
152 mpFile1->getline(buffer, 1024);
153 mpFile2->getline(buffer, 1024);
154 TS_ASSERT(!mpFile1->fail());
155 TS_ASSERT(!mpFile2->fail());
167 if (mCalledCollectively)
173 mpFile1 =
new std::ifstream(mFilename1.c_str());
176 if (!mpFile1->is_open())
180 EXCEPTION(
"Couldn't open file: " + mFilename1);
183 mpFile2 =
new std::ifstream(mFilename2.c_str());
186 if (!mpFile2->is_open())
193 EXCEPTION(
"Couldn't open file: " + mFilename2);
206 #endif // ABSTRACTFILECOMPARISON_HPP_ AbstractFileComparison(std::string fileName1, std::string fileName2, bool calledCollectively, bool suppressOutput)
virtual ~AbstractFileComparison()
void SkipHeaderLines(unsigned numLinesToSkip)
#define EXCEPTION(message)
AbstractFileComparison(const FileFinder &rFileFinder1, const FileFinder &rFileFinder2, bool calledCollectively, bool suppressOutput)