Skip to content

Commit

Permalink
Refs #8506. Multi-period tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Nov 27, 2013
1 parent c6c7396 commit 664f827
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,47 @@ class MuonLoadCorrectedTest : public CxxTest::TestSuite
Poco::File(filename).remove();
}

void test_multiPeriod_fromData()
{
MuonLoadCorrected alg;
TS_ASSERT_THROWS_NOTHING( alg.initialize() )
TS_ASSERT( alg.isInitialized() )

TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("Filename", "MUSR00015189.nxs") );
TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("DTCType", "FromData") );
TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("OutputWorkspace", g_outWSName) );

TS_ASSERT_THROWS_NOTHING( alg.execute(); );
TS_ASSERT( alg.isExecuted() );

WorkspaceGroup_sptr ws;
TS_ASSERT_THROWS_NOTHING( ws = AnalysisDataService::Instance().retrieveWS<WorkspaceGroup>(g_outWSName) );
TS_ASSERT(ws);
if (!ws) return;

/*
TS_ASSERT_EQUALS( ws->blocksize(), 2000 );
TS_ASSERT_EQUALS( ws->getNumberHistograms(), 32 );
TS_ASSERT_DELTA( ws->readY(0)[0], 52.0007, 0.0001);
TS_ASSERT_DELTA( ws->readY(7)[500], 166.017, 0.001);
TS_ASSERT_DELTA( ws->readY(15)[1000], 6.99998, 0.00001);
TS_ASSERT_DELTA( ws->readY(20)[1500], 1.000002, 0.000001);
TS_ASSERT_EQUALS( ws->readY(31)[1999], 0);
TS_ASSERT_DELTA( ws->readX(0)[0], -0.254, 0.001 );
TS_ASSERT_DELTA( ws->readX(15)[1000], 15.746, 0.001 );
TS_ASSERT_DELTA( ws->readX(31)[2000], 31.741, 0.001 );
TS_ASSERT_DELTA( ws->readE(0)[0], 7.211, 0.001 );
TS_ASSERT_DELTA( ws->readE(15)[1000], 2.646, 0.001 );
TS_ASSERT_DELTA( ws->readE(31)[1999], 0, 0.001);
*/
}

void test_multiPeriod_fromSpecifiedFile()
{}

void createDeadTimesTableFile(const std::string& filename, double value)
{
ITableWorkspace_sptr deadTimeTable = WorkspaceFactory::Instance().createTable("TableWorkspace");
Expand Down

0 comments on commit 664f827

Please sign in to comment.