diff --git a/Code/Mantid/Framework/Algorithms/src/MuonRemoveExpDecay.cpp b/Code/Mantid/Framework/Algorithms/src/MuonRemoveExpDecay.cpp index b2a99bda773d04d53f4bfebe1c67179d9fc42b21..f685ad9f31559936fb1aadb6afebc1ea9548b2a0 100644 --- a/Code/Mantid/Framework/Algorithms/src/MuonRemoveExpDecay.cpp +++ b/Code/Mantid/Framework/Algorithms/src/MuonRemoveExpDecay.cpp @@ -38,8 +38,7 @@ void MuonRemoveExpDecay::init() declareProperty(new API::WorkspaceProperty<API::MatrixWorkspace>("OutputWorkspace", "", Direction::Output), "The name of the workspace to be created as the output of the algorithm"); std::vector<int> empty; - declareProperty(new Kernel::ArrayProperty<int>("Spectra", empty, new MandatoryValidator<std::vector< - int> > ), "Spectra to remove the exponential decay from"); + declareProperty(new Kernel::ArrayProperty<int>("Spectra", empty), "Spectra to remove the exponential decay from"); } /** Executes the algorithm diff --git a/Code/Mantid/Framework/Algorithms/test/MuonRemoveExpDecayTest.h b/Code/Mantid/Framework/Algorithms/test/MuonRemoveExpDecayTest.h index ea1efd54edc46b7ec27ff01cbd95bbc2b3ce2f16..34250a847a564a58ae9dfe7c6535b6e4132f0de3 100644 --- a/Code/Mantid/Framework/Algorithms/test/MuonRemoveExpDecayTest.h +++ b/Code/Mantid/Framework/Algorithms/test/MuonRemoveExpDecayTest.h @@ -37,7 +37,6 @@ public: void testLoadNexusAndSetProperties() { //This test does not run on Windows64 as is does not support HDF4 files -#ifndef _WIN64 loader.initialize(); loader.setPropertyValue("Filename", "emu00006473.nxs"); @@ -48,21 +47,17 @@ public: alg.setPropertyValue("InputWorkspace", "EMU6473"); alg.setPropertyValue("OutputWorkspace", "Result"); alg.setPropertyValue("Spectra", "0"); -#endif /*_WIN64*/ } void testProperties() { //This test does not run on Windows64 as is does not support HDF4 files -#ifndef _WIN64 TS_ASSERT_EQUALS( alg.getPropertyValue("Spectra"), "0"); -#endif /*_WIN64*/ } void testExecute() { //This test does not run on Windows64 as is does not support HDF4 files -#ifndef _WIN64 try { TS_ASSERT_EQUALS(alg.execute(),true); @@ -73,9 +68,29 @@ public: } Workspace_const_sptr outputWS = AnalysisDataService::Instance().retrieve("Result"); -#endif /*_WIN64*/ } + void testWhereOptional3rdArgNotSet() + { + //This test does not run on Windows64 as is does not support HDF4 files + + MuonRemoveExpDecay alg2; + alg2.initialize(); + + alg2.setPropertyValue("InputWorkspace", "EMU6473"); + alg2.setPropertyValue("OutputWorkspace", "MuonRemoveExpDecayResult"); + + try + { + TS_ASSERT_EQUALS(alg2.execute(),true); + } + catch(std::runtime_error e) + { + TS_FAIL(e.what()); + } + } + + private: MuonRemoveExpDecay alg; Mantid::NeXus::LoadMuonNexus loader;