Skip to content

Commit

Permalink
Check start of 3rd line of output file re #6896
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
  • Loading branch information
KarlPalmen committed Jul 23, 2013
1 parent d68e5c2 commit 4c68b30
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,21 @@ class ModifyDetectorDotDatFileTest : public CxxTest::TestSuite
if( OutputFileExists) {
std::ifstream in(fullFilename.c_str());
std::string header;
std::string ignore;
std::string columnNames;

// Check header has name of algorithm in it
getline( in, header);
bool headerHasNameOfAlgorithmInIt = header.find("ModifyDetectorDotDatFile") != std::string::npos;
TS_ASSERT( headerHasNameOfAlgorithmInIt );

// Ignore 2nd line
TS_ASSERT_THROWS_NOTHING(getline (in, ignore));

// Now at 3rd line
TS_ASSERT_THROWS_NOTHING(getline (in, columnNames));
TS_ASSERT_EQUALS( columnNames.substr(0,9), " det no.");

in.close();

}
Expand Down

0 comments on commit 4c68b30

Please sign in to comment.