Skip to content

Commit

Permalink
Completed unit test. Refs #6968.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Aug 20, 2013
1 parent ea9f61a commit 39ebb37
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ class SaveGSASInstrumentFileTest : public CxxTest::TestSuite
// Poco::File::FileSize size = Poco::File("test.iparm").getSize();
// TS_ASSERT(size >= 16191 && size <= 16209); Removed due to windows

// Clean
AnalysisDataService::Instance().remove("PG3ProfileTable");
Poco::File("test.iparm").remove();
}

//----------------------------------------------------------------------------------------------
/** Test on import FP .irf file and import multiple banks
*/
void Xtest_SaveGSSInstrumentFile_MultiBank()
void test_SaveGSSInstrumentFile_MultiBank()
{
// Generate a 3-bank .irf file
string irffilename("pg3_60hz_3b.irf");
Expand All @@ -79,7 +80,7 @@ class SaveGSASInstrumentFileTest : public CxxTest::TestSuite
saver.initialize();
TS_ASSERT(saver.isInitialized());

saver.setProperty("InputFullprofResolutonFile", irffilename);
saver.setProperty("InputFileName", irffilename);
saver.setProperty("OutputFilename", prmfilename);
saver.setPropertyValue("BankIDs", "1, 3-4");
saver.setProperty("Instrument", "PG3");
Expand All @@ -93,10 +94,12 @@ class SaveGSASInstrumentFileTest : public CxxTest::TestSuite
saver.execute();
TS_ASSERT(saver.isExecuted());

// Check the output file against ... ....
// Load generated file
// Check existence of file
TS_ASSERT(Poco::File(prmfilename).exists());

AnalysisDataService::Instance().remove("PG3ProfileTable");
// Clean
Poco::File(prmfilename).remove();
Poco::File(irffilename).remove();
}

//----------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 39ebb37

Please sign in to comment.