Skip to content

Commit

Permalink
Refs #8839. Make test more robust against exceptions and fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Feb 12, 2014
1 parent 456307c commit d7702f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Code/Mantid/Framework/DataHandling/test/LoadMuonNexus1Test.h
Expand Up @@ -549,12 +549,13 @@ class LoadMuonNexus1Test : public CxxTest::TestSuite
{
LoadMuonNexus1 alg;
alg.initialize();
alg.setRethrows(true);
alg.setPropertyValue("Filename", "emu00006473.nxs");
alg.setProperty("AutoGroup", true);
alg.setPropertyValue("OutputWorkspace", outWsEntry.name());
alg.execute();
}
catch(std::runtime_error& e)
catch(std::exception& e)
{
TS_FAIL(e.what());
return;
Expand Down Expand Up @@ -586,12 +587,13 @@ class LoadMuonNexus1Test : public CxxTest::TestSuite
{
LoadMuonNexus1 alg;
alg.initialize();
alg.setRethrows(true);
alg.setPropertyValue("Filename", "MUSR00015189.nxs");
alg.setProperty("AutoGroup", true);
alg.setPropertyValue("OutputWorkspace", outWsEntry.name());
alg.execute();
}
catch(std::runtime_error& e)
catch(std::exception& e)
{
TS_FAIL(e.what());
return;
Expand Down Expand Up @@ -622,7 +624,7 @@ class LoadMuonNexus1Test : public CxxTest::TestSuite
TS_ASSERT_EQUALS( outWs1->readY(1)[1997], 0 );
}

auto outWs2 = boost::dynamic_pointer_cast<MatrixWorkspace>( outWs->getItem(0) );
auto outWs2 = boost::dynamic_pointer_cast<MatrixWorkspace>( outWs->getItem(1) );
TS_ASSERT(outWs2);

if (outWs2) {
Expand Down

0 comments on commit d7702f2

Please sign in to comment.