Skip to content

Commit

Permalink
Merge branch 'feature/8023_converttomd_validateinputs' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	Code/Mantid/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h

Re #8023
  • Loading branch information
peterfpeterson committed Oct 10, 2013
2 parents 95b9c22 + af06ec6 commit 3567bb9
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions Code/Mantid/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,7 @@ void testExecWorksAutoLimitsOnNewWorkspaceNoMaxLimits()
TS_ASSERT_THROWS_NOTHING(pAlg->setPropertyValue("OutputWorkspace", "EnergyTransfer4DWS"));
TS_ASSERT_THROWS_NOTHING(pAlg->setPropertyValue("MinValues", "-50.,-50.,-50,-2"));

pAlg->execute();
if(!pAlg->isExecuted())
{
TSM_ASSERT("have not executed convertToMD with only min limits specied ",false);
return;
}

TSM_ASSERT_THROWS("Should fail as no max limits were specified ",pAlg->execute(), std::runtime_error);

auto childAlg = calcMinMaxValDefaults("Q3D","HKL");
if (!childAlg) return;
Expand All @@ -223,9 +217,6 @@ void testExecWorksAutoLimitsOnNewWorkspaceNoMaxLimits()
TS_ASSERT_DELTA(maxVal[i],pDim->getMaximum(),1.e-4);
}




}
void testExecFailsLimits_MinGeMax(){
Mantid::API::MatrixWorkspace_sptr ws2D =WorkspaceCreationHelper::createProcessedWorkspaceWithCylComplexInstrument(100,10,true);
Expand All @@ -243,8 +234,7 @@ void testExecFailsLimits_MinGeMax(){
TS_ASSERT_THROWS_NOTHING(pAlg->setPropertyValue("MinValues", "-50.,-50.,-50,-2"));
TS_ASSERT_THROWS_NOTHING(pAlg->setPropertyValue("MaxValues", " 50., 50.,-50,-2"));

pAlg->execute();
TSM_ASSERT("Wrong min-max values revert min-max to defaults",pAlg->isExecuted());
TSM_ASSERT_THROWS("Should fail as wrong max limits were specified ",pAlg->execute(), std::runtime_error);

auto childAlg = calcMinMaxValDefaults("Q3D","HKL");
if (!childAlg) return;
Expand All @@ -261,7 +251,6 @@ void testExecFailsLimits_MinGeMax(){
TS_ASSERT_DELTA(maxVal[i],pDim->getMaximum(),1.e-4);
}


}
void testExecFine(){
// create model processed workpsace with 10x10 cylindrical detectors, 10 energy levels and oriented lattice
Expand Down

0 comments on commit 3567bb9

Please sign in to comment.