Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/8073_check_file_existence'
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Nov 15, 2013
2 parents 2e4a47d + 9a5bd3a commit 131394c
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ class SaveGSASInstrumentFileTest : public CxxTest::TestSuite
saver.execute();
TS_ASSERT(saver.isExecuted());

// Check the output file's existence and size;
TS_ASSERT(Poco::File("test.iparm").exists());
// Check the output file's existence and size
std::string filename = saver.getProperty("OutputFilename"); // get full pathname
TS_ASSERT(Poco::File(filename).exists());

string filename("test.iparm");
vector<size_t> veclineindextoread;
veclineindextoread.push_back(5);
veclineindextoread.push_back(20);
Expand All @@ -77,7 +77,7 @@ class SaveGSASInstrumentFileTest : public CxxTest::TestSuite

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

return;
}
Expand All @@ -89,7 +89,7 @@ class SaveGSASInstrumentFileTest : public CxxTest::TestSuite
{
// Generate a 3-bank .irf file
string irffilename("pg3_60hz_3b.irf");
string prmfilename("test3bank.iparm");
string prmfilename1("test3bank.iparm");

generate3BankIrfFile(irffilename);
TS_ASSERT(Poco::File(irffilename).exists());
Expand All @@ -100,7 +100,7 @@ class SaveGSASInstrumentFileTest : public CxxTest::TestSuite
TS_ASSERT(saver.isInitialized());

saver.setProperty("InputFileName", irffilename);
saver.setProperty("OutputFilename", prmfilename);
saver.setProperty("OutputFilename", prmfilename1);
saver.setPropertyValue("BankIDs", "1, 3-4");
// saver.setProperty("Instrument", "PG3");
saver.setPropertyValue("ChopperFrequency", "60");
Expand All @@ -114,6 +114,7 @@ class SaveGSASInstrumentFileTest : public CxxTest::TestSuite
TS_ASSERT(saver.isExecuted());

// Check existence of file
std::string prmfilename = saver.getProperty("OutputFilename");
TS_ASSERT(Poco::File(prmfilename).exists());

string filename("test3bank.iparm");
Expand Down

0 comments on commit 131394c

Please sign in to comment.