diff --git a/Framework/API/test/BinEdgeAxisTest.h b/Framework/API/test/BinEdgeAxisTest.h index 261954ac3059a730b3f85f44339887b121e736f2..60b583c0edf8e60606a24ff6ba82d8e8e5cfa54f 100644 --- a/Framework/API/test/BinEdgeAxisTest.h +++ b/Framework/API/test/BinEdgeAxisTest.h @@ -77,7 +77,7 @@ public: ax1.setValue(i, static_cast<double>(i + 1)); } - TS_ASSERT_THROWS(ax1.indexOfValue(0.9), const std::out_of_range &); // start + TS_ASSERT_THROWS(ax1.indexOfValue(0.9), const std::out_of_range &); // start TS_ASSERT_THROWS(ax1.indexOfValue(10.1), const std::out_of_range &); // end } }; diff --git a/Framework/API/test/CompositeFunctionTest.h b/Framework/API/test/CompositeFunctionTest.h index e3e41046dfecce2cce59074f5b9f8a66baed44cd..06224b8c2e98a0a85cada5ca007313580843885e 100644 --- a/Framework/API/test/CompositeFunctionTest.h +++ b/Framework/API/test/CompositeFunctionTest.h @@ -528,12 +528,18 @@ public: mfun->fix(10); // g2->fix(1); // This doesn't work - TS_ASSERT_THROWS(mfun->setActiveParameter(0, 0), const std::runtime_error &); - TS_ASSERT_THROWS(mfun->setActiveParameter(1, 0), const std::runtime_error &); - TS_ASSERT_THROWS(mfun->setActiveParameter(4, 0), const std::runtime_error &); - TS_ASSERT_THROWS(mfun->setActiveParameter(6, 0), const std::runtime_error &); - TS_ASSERT_THROWS(mfun->setActiveParameter(7, 0), const std::runtime_error &); - TS_ASSERT_THROWS(mfun->setActiveParameter(10, 0), const std::runtime_error &); + TS_ASSERT_THROWS(mfun->setActiveParameter(0, 0), + const std::runtime_error &); + TS_ASSERT_THROWS(mfun->setActiveParameter(1, 0), + const std::runtime_error &); + TS_ASSERT_THROWS(mfun->setActiveParameter(4, 0), + const std::runtime_error &); + TS_ASSERT_THROWS(mfun->setActiveParameter(6, 0), + const std::runtime_error &); + TS_ASSERT_THROWS(mfun->setActiveParameter(7, 0), + const std::runtime_error &); + TS_ASSERT_THROWS(mfun->setActiveParameter(10, 0), + const std::runtime_error &); mfun->setActiveParameter(2, 100); mfun->setActiveParameter(3, 101); diff --git a/Framework/API/test/ExpressionTest.h b/Framework/API/test/ExpressionTest.h index 802ffd48bce2415ac4a6670d773d78d663740a09..68db7b49d28e29d5a7f5fb29f0e1b13cb05462aa 100644 --- a/Framework/API/test/ExpressionTest.h +++ b/Framework/API/test/ExpressionTest.h @@ -402,7 +402,8 @@ public: void testEndOnOperator() { { Expression expression; - TS_ASSERT_THROWS(expression.parse("x+y+z + "), const std::runtime_error &); + TS_ASSERT_THROWS(expression.parse("x+y+z + "), + const std::runtime_error &); } { Expression expression; diff --git a/Framework/API/test/FermiChopperModelTest.h b/Framework/API/test/FermiChopperModelTest.h index 7e286708244bf5f6c28e011ada086ed27fc2c638..c327a508d6e4d9ed00a7840e6538f51ec9eef942 100644 --- a/Framework/API/test/FermiChopperModelTest.h +++ b/Framework/API/test/FermiChopperModelTest.h @@ -22,7 +22,8 @@ public: void test_Default_Object_Throws_When_Computing_Pulse_Variance() { using namespace Mantid::API; FermiChopperModel chopper; - TS_ASSERT_THROWS(chopper.pulseTimeVariance(), const std::invalid_argument &); + TS_ASSERT_THROWS(chopper.pulseTimeVariance(), + const std::invalid_argument &); } void test_Getters_Produce_Expected_Values_When_Set_By_Settings() { @@ -67,7 +68,8 @@ public: chopper->setAngularVelocityInHz(350); chopper->setChopperRadius(155.0 / 1000.); - TS_ASSERT_THROWS(chopper->pulseTimeVariance(), const std::invalid_argument &); + TS_ASSERT_THROWS(chopper->pulseTimeVariance(), + const std::invalid_argument &); } void diff --git a/Framework/API/test/FunctionParameterDecoratorTest.h b/Framework/API/test/FunctionParameterDecoratorTest.h index 4c831f6f1b51cba3a06791e249aa725b9b3be8de..b1cd645a22ea7fd13fb7f8170f5d844a5688a518 100644 --- a/Framework/API/test/FunctionParameterDecoratorTest.h +++ b/Framework/API/test/FunctionParameterDecoratorTest.h @@ -23,8 +23,8 @@ using namespace Mantid::API; using namespace Mantid::Kernel; -using ::testing::_; using ::testing::Mock; +using ::testing::_; class FunctionParameterDecoratorTest; diff --git a/Framework/API/test/IFunction1DSpectrumTest.h b/Framework/API/test/IFunction1DSpectrumTest.h index 1b534adeb73e9bab44f38bc3b36b8dc982c5fdb2..ea9b1c5ed5cf7fe7b51d5819c67696f6d80e1ff4 100644 --- a/Framework/API/test/IFunction1DSpectrumTest.h +++ b/Framework/API/test/IFunction1DSpectrumTest.h @@ -59,7 +59,8 @@ public: IFunction_sptr fun(new ConcreteFunction1DSpectrum); - TS_ASSERT_THROWS(fun->function(domain, values), const std::invalid_argument &); + TS_ASSERT_THROWS(fun->function(domain, values), + const std::invalid_argument &); } private: diff --git a/Framework/API/test/ILatticeFunctionTest.h b/Framework/API/test/ILatticeFunctionTest.h index eac5855a691dcc68bf53e1b954fd7ee98faf29a4..09616fe600c0b0e2a75e21189ce0eabc302f62cf 100644 --- a/Framework/API/test/ILatticeFunctionTest.h +++ b/Framework/API/test/ILatticeFunctionTest.h @@ -70,7 +70,8 @@ public: EXPECT_CALL(wrongDomain, size()).WillRepeatedly(Return(1)); FunctionValues values(wrongDomain); - TS_ASSERT_THROWS(fn.function(wrongDomain, values), const std::invalid_argument &); + TS_ASSERT_THROWS(fn.function(wrongDomain, values), + const std::invalid_argument &); MockJacobian jacobian; TS_ASSERT_THROWS(fn.functionDeriv(wrongDomain, jacobian), diff --git a/Framework/API/test/IkedaCarpenterModeratorTest.h b/Framework/API/test/IkedaCarpenterModeratorTest.h index e74ba160bfe3f47df26a7ccd589a792db75698f4..9286ee7e6070a591ebba43fa61f3b1379ee50fd9 100644 --- a/Framework/API/test/IkedaCarpenterModeratorTest.h +++ b/Framework/API/test/IkedaCarpenterModeratorTest.h @@ -42,13 +42,15 @@ public: void test_Initializing_With_Invalid_String_Throws() { Mantid::API::IkedaCarpenterModerator ikmod; - TS_ASSERT_THROWS(ikmod.initialize("TiltAngle"), const std::invalid_argument &); + TS_ASSERT_THROWS(ikmod.initialize("TiltAngle"), + const std::invalid_argument &); } void test_Initializing_With_String_Containing_Unknown_Parameter_Throws() { Mantid::API::IkedaCarpenterModerator ikmod; - TS_ASSERT_THROWS(ikmod.initialize("unknown=6.3"), const std::invalid_argument &); + TS_ASSERT_THROWS(ikmod.initialize("unknown=6.3"), + const std::invalid_argument &); } void @@ -123,7 +125,8 @@ public: TS_ASSERT_THROWS(ikmod->sampleTimeDistribution(1.01), const std::invalid_argument &); - TS_ASSERT_THROWS(ikmod->sampleTimeDistribution(5.5), const std::invalid_argument &); + TS_ASSERT_THROWS(ikmod->sampleTimeDistribution(5.5), + const std::invalid_argument &); } private: diff --git a/Framework/API/test/IndexTypePropertyTest.h b/Framework/API/test/IndexTypePropertyTest.h index 78ce5d79332a6fb51dee58318c2c36634ed3872f..1b3d2e9bab298acb1592510356989734b29c4e14 100644 --- a/Framework/API/test/IndexTypePropertyTest.h +++ b/Framework/API/test/IndexTypePropertyTest.h @@ -29,7 +29,8 @@ public: } void testContructorFailsWithInvalidIndexType() { - TS_ASSERT_THROWS(IndexTypeProperty("IndexType", 0), const std::invalid_argument &); + TS_ASSERT_THROWS(IndexTypeProperty("IndexType", 0), + const std::invalid_argument &); } void testSingleIndexTypeAutomaticallySet() { diff --git a/Framework/API/test/LatticeDomainTest.h b/Framework/API/test/LatticeDomainTest.h index b1ed9e0d0d496f68e4eb9234988e912a66196adc..8f59ed4ef59e7dcdc8df4907ff24375184f3f1f3 100644 --- a/Framework/API/test/LatticeDomainTest.h +++ b/Framework/API/test/LatticeDomainTest.h @@ -13,8 +13,8 @@ #include "MantidKernel/Exception.h" using Mantid::API::LatticeDomain; -using Mantid::Kernel::V3D; using Mantid::Kernel::Exception::IndexError; +using Mantid::Kernel::V3D; using namespace Mantid::API; diff --git a/Framework/API/test/LogFilterGeneratorTest.h b/Framework/API/test/LogFilterGeneratorTest.h index 12fd7bb1c4de21b9816f376f5c7f0930e0affb8e..9b15160025f7648d47dc5f3dfc94b99d3b44c5b5 100644 --- a/Framework/API/test/LogFilterGeneratorTest.h +++ b/Framework/API/test/LogFilterGeneratorTest.h @@ -43,7 +43,8 @@ public: void test_logExistsButIsNotNumericTimeSeries_throws() { auto ws = createTestWorkspace(); LogFilterGenerator generator(LogFilterGenerator::FilterType::Status, ws); - TS_ASSERT_THROWS(generator.generateFilter("BadLog"), const std::invalid_argument &); + TS_ASSERT_THROWS(generator.generateFilter("BadLog"), + const std::invalid_argument &); } void test_typeIsNone_noFilterReturned() { diff --git a/Framework/API/test/MultiDomainFunctionTest.h b/Framework/API/test/MultiDomainFunctionTest.h index 7e076be2a880acd337a8cf54b2a20ae661d67643..f45dd819125051ce73af17a3ef3610bf1f3ca775 100644 --- a/Framework/API/test/MultiDomainFunctionTest.h +++ b/Framework/API/test/MultiDomainFunctionTest.h @@ -233,10 +233,12 @@ public: FunctionValues values(domain); multi.setDomainIndex(0, 3); - TS_ASSERT_THROWS(multi.function(domain, values), const std::invalid_argument &); + TS_ASSERT_THROWS(multi.function(domain, values), + const std::invalid_argument &); multi.setDomainIndex(0, 4); - TS_ASSERT_THROWS(multi.function(domain, values), const std::invalid_argument &); + TS_ASSERT_THROWS(multi.function(domain, values), + const std::invalid_argument &); } void test_calc() { diff --git a/Framework/API/test/ParamFunctionAttributeHolderTest.h b/Framework/API/test/ParamFunctionAttributeHolderTest.h index d347d77bda1a512fd2b1bd64c140ece38b8dc17b..db87f0da160f29d46ee01a17e5fd25b3d50f8c29 100644 --- a/Framework/API/test/ParamFunctionAttributeHolderTest.h +++ b/Framework/API/test/ParamFunctionAttributeHolderTest.h @@ -51,7 +51,8 @@ public: using namespace Mantid::API; FakeParamFunctionAttributeHolder funct; - TS_ASSERT_THROWS(funct.getAttribute("NonExistent"), const std::invalid_argument &); + TS_ASSERT_THROWS(funct.getAttribute("NonExistent"), + const std::invalid_argument &); TS_ASSERT_THROWS(funct.setAttribute("NonExistent", IFunction::Attribute(1)), const std::invalid_argument &); } diff --git a/Framework/API/test/ProgressTest.h b/Framework/API/test/ProgressTest.h index 32b95dec616598de24e3d57d57875ee9964847f6..155ce82ceb9a3f5c81274aeb5d14e721fb1bddb4 100644 --- a/Framework/API/test/ProgressTest.h +++ b/Framework/API/test/ProgressTest.h @@ -20,8 +20,10 @@ public: static void destroySuite(ProgressTest *suite) { delete suite; } void testBadParameters() { - TS_ASSERT_THROWS(Progress(nullptr, -1., 100., 42), const std::invalid_argument &); - TS_ASSERT_THROWS(Progress(nullptr, 1., .1, 42), const std::invalid_argument &); + TS_ASSERT_THROWS(Progress(nullptr, -1., 100., 42), + const std::invalid_argument &); + TS_ASSERT_THROWS(Progress(nullptr, 1., .1, 42), + const std::invalid_argument &); } }; diff --git a/Framework/API/test/SpectrumDetectorMappingTest.h b/Framework/API/test/SpectrumDetectorMappingTest.h index b355f8e86c90778708f1cd8e2c53ea03992137f2..161212ac9ec9f1fb8fcfb34b7ec3a5ceded52fff 100644 --- a/Framework/API/test/SpectrumDetectorMappingTest.h +++ b/Framework/API/test/SpectrumDetectorMappingTest.h @@ -28,7 +28,8 @@ public: void test_workspace_constructor() { MatrixWorkspace_const_sptr ws; - TS_ASSERT_THROWS(SpectrumDetectorMapping map(ws), const std::invalid_argument &); + TS_ASSERT_THROWS(SpectrumDetectorMapping map(ws), + const std::invalid_argument &); } void test_workspace_constructor_fills_map() { @@ -155,9 +156,12 @@ public: SpectrumDetectorMapping map(ws); // The happy path is tested in the methods above. Just test invalid entry // here. - TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(1), const std::out_of_range &); - TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(0), const std::out_of_range &); - TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(-1), const std::out_of_range &); + TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(1), + const std::out_of_range &); + TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(0), + const std::out_of_range &); + TS_ASSERT_THROWS(map.getDetectorIDsForSpectrumNo(-1), + const std::out_of_range &); } }; diff --git a/Framework/API/test/VectorParameterParserTest.h b/Framework/API/test/VectorParameterParserTest.h index 4add39bd70a5df5081f328c34170c0c592bb187c..80a94317a092b701ce79dcd1e755e074a5c7ceb8 100644 --- a/Framework/API/test/VectorParameterParserTest.h +++ b/Framework/API/test/VectorParameterParserTest.h @@ -96,7 +96,8 @@ public: ConcreteVectorDblParamParser parser; TSM_ASSERT_THROWS("No successor, so should throw!", - parser.createParameter(pRootElem), const std::runtime_error &); + parser.createParameter(pRootElem), + const std::runtime_error &); } DECLARE_VECTOR_PARAMETER(SucessorVectorParameter, double) diff --git a/Framework/Algorithms/test/AddNoteTest.h b/Framework/Algorithms/test/AddNoteTest.h index 258f2bad3041545969f7d289cfb7488bdb84ba74..d2d50b9eace081efa45f3108887827a2c57a9a6a 100644 --- a/Framework/Algorithms/test/AddNoteTest.h +++ b/Framework/Algorithms/test/AddNoteTest.h @@ -55,14 +55,16 @@ public: Mantid::Algorithms::AddNote alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); - TS_ASSERT_THROWS(alg.setPropertyValue("Name", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setPropertyValue("Name", ""), + const std::invalid_argument &); } void test_empty_value_not_allowed() { Mantid::Algorithms::AddNote alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); - TS_ASSERT_THROWS(alg.setPropertyValue("Value", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setPropertyValue("Value", ""), + const std::invalid_argument &); } void test_empty_time_is_allowed() { diff --git a/Framework/Algorithms/test/AddTimeSeriesLogTest.h b/Framework/Algorithms/test/AddTimeSeriesLogTest.h index 194e9feff6a76dda436a038770be669336270b89..0ad0865eb0cbf8f766699a357ec0575b87305ca4 100644 --- a/Framework/Algorithms/test/AddTimeSeriesLogTest.h +++ b/Framework/Algorithms/test/AddTimeSeriesLogTest.h @@ -81,21 +81,24 @@ public: Mantid::Algorithms::AddTimeSeriesLog alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); - TS_ASSERT_THROWS(alg.setPropertyValue("Name", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setPropertyValue("Name", ""), + const std::invalid_argument &); } void test_empty_time_not_allowed() { Mantid::Algorithms::AddTimeSeriesLog alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); - TS_ASSERT_THROWS(alg.setPropertyValue("Time", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setPropertyValue("Time", ""), + const std::invalid_argument &); } void test_empty_value_not_allowed() { Mantid::Algorithms::AddTimeSeriesLog alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); - TS_ASSERT_THROWS(alg.setPropertyValue("Value", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setPropertyValue("Value", ""), + const std::invalid_argument &); } void test_time_as_non_iso_formatted_string_throws_invalid_argument() { diff --git a/Framework/Algorithms/test/DeleteLogTest.h b/Framework/Algorithms/test/DeleteLogTest.h index 3b7337d6a787a4da7b5f152c286ca0f6e362235d..e2083f00b7e1a830f6599ba2ba27660f7901ae7e 100644 --- a/Framework/Algorithms/test/DeleteLogTest.h +++ b/Framework/Algorithms/test/DeleteLogTest.h @@ -79,7 +79,8 @@ public: void test_empty_log_name_throws_invalid_argument() { Mantid::Algorithms::DeleteLog alg; alg.initialize(); - TS_ASSERT_THROWS(alg.setProperty("Name", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("Name", ""), + const std::invalid_argument &); } }; diff --git a/Framework/Algorithms/test/FilterByLogValueTest.h b/Framework/Algorithms/test/FilterByLogValueTest.h index 659a0d2b4465a193e0bb774a11a860b9d4764274..0ff1fb07ee5301c6e46c025f12fb6ef96220fc2f 100644 --- a/Framework/Algorithms/test/FilterByLogValueTest.h +++ b/Framework/Algorithms/test/FilterByLogValueTest.h @@ -46,7 +46,8 @@ public: "InputWorkspace", WorkspaceCreationHelper::createEventWorkspace())); // LogName must not be empty - TS_ASSERT_THROWS(alg.setProperty("LogName", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("LogName", ""), + const std::invalid_argument &); // TimeTolerance cannot be negative TS_ASSERT_THROWS(alg.setProperty("TimeTolerance", -0.1), @@ -55,7 +56,8 @@ public: TS_ASSERT_THROWS_NOTHING(alg.setProperty("TimeTolerance", 0.0)); // LogBoundary must be one of "Centre" and "Left" - TS_ASSERT_THROWS(alg.setProperty("LogBoundary", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("LogBoundary", ""), + const std::invalid_argument &); TS_ASSERT_THROWS(alg.setProperty("LogBoundary", "Middle"), const std::invalid_argument &); TS_ASSERT_THROWS_NOTHING(alg.setProperty("LogBoundary", "Left")); diff --git a/Framework/Algorithms/test/GetAllEiTest.h b/Framework/Algorithms/test/GetAllEiTest.h index 83871ee9b5d9667913c67dad33ab706bcf24b0d6..63d584a57dd008fb6c9026fa57e9583b670efc2c 100644 --- a/Framework/Algorithms/test/GetAllEiTest.h +++ b/Framework/Algorithms/test/GetAllEiTest.h @@ -182,7 +182,8 @@ public: m_getAllEi.setProperty("OutputWorkspace", "monitor_peaks"); TSM_ASSERT_THROWS( "should throw runtime error on as spectra ID should be positive", - m_getAllEi.setProperty("Monitor1SpecID", -1), const std::invalid_argument &); + m_getAllEi.setProperty("Monitor1SpecID", -1), + const std::invalid_argument &); m_getAllEi.setProperty("Monitor1SpecID", 1); m_getAllEi.setProperty("Monitor2SpecID", 2); @@ -257,7 +258,8 @@ public: // Test sort log by run time. TSM_ASSERT_THROWS( "Attempt to get log without start/stop time set should fail", - m_getAllEi.getAvrgLogValue(ws, "ChopperSpeedLog"), const std::runtime_error &); + m_getAllEi.getAvrgLogValue(ws, "ChopperSpeedLog"), + const std::runtime_error &); ws->mutableRun().setStartAndEndTime(Types::Core::DateAndTime(90, 0), Types::Core::DateAndTime(10000, 0)); diff --git a/Framework/Algorithms/test/He3TubeEfficiencyTest.h b/Framework/Algorithms/test/He3TubeEfficiencyTest.h index fd00f4d52b70d5f8b6e8e7fc3b3eca48b488abdc..eb1ba7231407b5e8b5de687d27d07583072b6c3f 100644 --- a/Framework/Algorithms/test/He3TubeEfficiencyTest.h +++ b/Framework/Algorithms/test/He3TubeEfficiencyTest.h @@ -27,8 +27,8 @@ using namespace Mantid::DataObjects; using namespace Mantid::DataHandling; using namespace std; using Mantid::HistogramData::BinEdges; -using Mantid::HistogramData::Counts; using Mantid::HistogramData::CountStandardDeviations; +using Mantid::HistogramData::Counts; namespace He3TubeEffeciencyHelper { void createWorkspace2DInADS(const std::string inputWS) { diff --git a/Framework/Algorithms/test/InterpolationOptionTest.h b/Framework/Algorithms/test/InterpolationOptionTest.h index 9f3b2c77fe7e68117b1f493da6b5fbb3aef5a6ca..4d690530137902d9b40536f97be4f3e030467675 100644 --- a/Framework/Algorithms/test/InterpolationOptionTest.h +++ b/Framework/Algorithms/test/InterpolationOptionTest.h @@ -87,7 +87,8 @@ public: //---------------------------------------------------------------------------- void test_set_From_String_Throws_With_Unknown_Type() { InterpolationOption interpolateOpt; - TS_ASSERT_THROWS(interpolateOpt.set("Unknown"), const std::invalid_argument &); + TS_ASSERT_THROWS(interpolateOpt.set("Unknown"), + const std::invalid_argument &); } void test_set_From_String_Throws_With_Empty_String() { diff --git a/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h b/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h index f69916ed458920353c8589ee2b389d7c38a6ba5e..9ed72a8bf589cc6556d4fb701850153e200d291c 100644 --- a/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h +++ b/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h @@ -228,10 +228,13 @@ public: boost::shared_ptr<MockTransform>(transform)); // When data were not loaded public methods should throw an exception - TS_ASSERT_THROWS(calculator.getReconstructedData(), const std::runtime_error &); + TS_ASSERT_THROWS(calculator.getReconstructedData(), + const std::runtime_error &); TS_ASSERT_THROWS(calculator.getImage(), const std::runtime_error &); - TS_ASSERT_THROWS(calculator.getSearchDirections(), const std::runtime_error &); - TS_ASSERT_THROWS(calculator.getQuadraticCoefficients(), const std::runtime_error &); + TS_ASSERT_THROWS(calculator.getSearchDirections(), + const std::runtime_error &); + TS_ASSERT_THROWS(calculator.getQuadraticCoefficients(), + const std::runtime_error &); TS_ASSERT_THROWS(calculator.getAngle(), const std::runtime_error &); TS_ASSERT_THROWS(calculator.getChisq(), const std::runtime_error &); } diff --git a/Framework/Algorithms/test/MayersSampleCorrectionTest.h b/Framework/Algorithms/test/MayersSampleCorrectionTest.h index 8515a8c867dec2c38983dafde431407e45b82ae5..2e751a38223973b4dbed0ab6012e7f0dc60776d5 100644 --- a/Framework/Algorithms/test/MayersSampleCorrectionTest.h +++ b/Framework/Algorithms/test/MayersSampleCorrectionTest.h @@ -82,7 +82,8 @@ public: void test_Input_Workspace_With_No_Instrument_Throws_Error() { auto noInstWS = createTestWorkspaceWithNoInstrument(); - TS_ASSERT_THROWS(runAlgorithm(noInstWS, true), const std::invalid_argument &); + TS_ASSERT_THROWS(runAlgorithm(noInstWS, true), + const std::invalid_argument &); } void test_InputWorkspace_With_No_Sample_Shape_Throws_Error() { diff --git a/Framework/Algorithms/test/RadiusSumTest.h b/Framework/Algorithms/test/RadiusSumTest.h index 762305e816c1e6f26b55c4871e160a08557b3b6b..bb5a934026ef2f68fbd4efb399f0a8e11ae0a6da 100644 --- a/Framework/Algorithms/test/RadiusSumTest.h +++ b/Framework/Algorithms/test/RadiusSumTest.h @@ -38,7 +38,8 @@ public: { // check numbins, min and max radius auto alg = algInstance(); // check numbins is only integer > 1 - TS_ASSERT_THROWS(alg->setProperty("NumBins", -3), const std::invalid_argument &); + TS_ASSERT_THROWS(alg->setProperty("NumBins", -3), + const std::invalid_argument &); TS_ASSERT_THROWS_NOTHING(alg->setProperty("MinRadius", 1.0)); TS_ASSERT_THROWS_NOTHING(alg->setProperty("MaxRadius", 0.1)); MatrixWorkspace_sptr goodWS = RingProfileTest::create_2d_workspace(); diff --git a/Framework/Algorithms/test/RemoveBackgroundTest.h b/Framework/Algorithms/test/RemoveBackgroundTest.h index 125aaf49ffad9456c024b15278130fa299bffb81..43313266da65365cb699f32d5c9482abfcd1404c 100644 --- a/Framework/Algorithms/test/RemoveBackgroundTest.h +++ b/Framework/Algorithms/test/RemoveBackgroundTest.h @@ -96,7 +96,8 @@ public: std::vector<double>(1, 10.)); TSM_ASSERT_THROWS( "Should throw if background workspace is not in TOF units", - bgRemoval.initialize(bkgWS, SourceWS, 0), const std::invalid_argument &); + bgRemoval.initialize(bkgWS, SourceWS, 0), + const std::invalid_argument &); bkgWS = WorkspaceCreationHelper::create2DWorkspaceWithFullInstrument(2, 15); TSM_ASSERT_THROWS("Should throw if background is not 1 or equal to source", diff --git a/Framework/Algorithms/test/RingProfileTest.h b/Framework/Algorithms/test/RingProfileTest.h index ce17a91f2de50c230f8e8e4958fdb4b6f22e44d0..9271e155e51305a2647b08c3c6d9d06c51baf20c 100644 --- a/Framework/Algorithms/test/RingProfileTest.h +++ b/Framework/Algorithms/test/RingProfileTest.h @@ -33,7 +33,8 @@ public: TS_ASSERT(alg.isInitialized()); // check numbins is only integer > 1 - TS_ASSERT_THROWS(alg.setProperty("NumBins", -3), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("NumBins", -3), + const std::invalid_argument &); // ange between [-360, 360] TS_ASSERT_THROWS(alg.setProperty("StartAngle", 500.0), const std::invalid_argument &); diff --git a/Framework/Algorithms/test/SumEventsByLogValueTest.h b/Framework/Algorithms/test/SumEventsByLogValueTest.h index e1f9ccffe1fdd367d09f40ce5dde6d42a5c74271..afdec04c0d8fc5dc61bb0121ebe5d0dd9e8bb5ec 100644 --- a/Framework/Algorithms/test/SumEventsByLogValueTest.h +++ b/Framework/Algorithms/test/SumEventsByLogValueTest.h @@ -41,7 +41,8 @@ public: "InputWorkspace", WorkspaceCreationHelper::createEventWorkspace())); // LogName must not be empty - TS_ASSERT_THROWS(alg.setProperty("LogName", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("LogName", ""), + const std::invalid_argument &); } void test_validateInputs() { diff --git a/Framework/Algorithms/test/WeightingStrategyTest.h b/Framework/Algorithms/test/WeightingStrategyTest.h index cdc4fdda4367dfc7ceaf5be49c3e306499254d32..4d9d6a57e5f3bfb1f8a058c21210015a323a0cc6 100644 --- a/Framework/Algorithms/test/WeightingStrategyTest.h +++ b/Framework/Algorithms/test/WeightingStrategyTest.h @@ -161,9 +161,11 @@ public: void testGaussiannDConstructor() { TSM_ASSERT_THROWS("GaussianWeighting2D should not allow unsigned cuttoff", - GaussianWeightingnD(-1, 1), const std::invalid_argument &); + GaussianWeightingnD(-1, 1), + const std::invalid_argument &); TSM_ASSERT_THROWS("GaussianWeighting2D should not allow unsigned sigma", - GaussianWeightingnD(1, -1), const std::invalid_argument &); + GaussianWeightingnD(1, -1), + const std::invalid_argument &); TSM_ASSERT_THROWS_NOTHING("GaussianWeighting2D should have constructed " "with the valid provided arguments", GaussianWeightingnD(1, 1)); diff --git a/Framework/Beamline/test/DetectorInfoTest.h b/Framework/Beamline/test/DetectorInfoTest.h index fbe9209762a3e3c95451ee2e7d86f9c43f4b9d7b..2d66099e493fdf7da76e4b0fec2529fdebf5043b 100644 --- a/Framework/Beamline/test/DetectorInfoTest.h +++ b/Framework/Beamline/test/DetectorInfoTest.h @@ -55,7 +55,8 @@ public: } void test_constructor_length_mismatch() { - TS_ASSERT_THROWS(DetectorInfo(PosVec(3), RotVec(2)), const std::runtime_error &); + TS_ASSERT_THROWS(DetectorInfo(PosVec(3), RotVec(2)), + const std::runtime_error &); } void test_assign_componentInfo() { diff --git a/Framework/Crystal/test/CombinePeaksWorkspacesTest.h b/Framework/Crystal/test/CombinePeaksWorkspacesTest.h index afa1a125623fb3ea3db7a0704a099b23ffc92d84..a774de9b1b3ff582b7a7e7731eb2af093500b23f 100644 --- a/Framework/Crystal/test/CombinePeaksWorkspacesTest.h +++ b/Framework/Crystal/test/CombinePeaksWorkspacesTest.h @@ -34,7 +34,8 @@ public: CombinePeaksWorkspaces alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) // Tolerance has to be positive. Even if CombineMatchingPeaks is false! - TS_ASSERT_THROWS(alg.setProperty("Tolerance", -1.0), const std::invalid_argument &) + TS_ASSERT_THROWS(alg.setProperty("Tolerance", -1.0), + const std::invalid_argument &) } void test_keep_all_peaks() { diff --git a/Framework/Crystal/test/DiffPeaksWorkspacesTest.h b/Framework/Crystal/test/DiffPeaksWorkspacesTest.h index 6b65a9b18032233cf91a7eb53a7cc0e970035d34..b2b7fa443b3521016edfdacdde8d5ca850b0962a 100644 --- a/Framework/Crystal/test/DiffPeaksWorkspacesTest.h +++ b/Framework/Crystal/test/DiffPeaksWorkspacesTest.h @@ -34,7 +34,8 @@ public: DiffPeaksWorkspaces alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) // Tolerance has to be positive. - TS_ASSERT_THROWS(alg.setProperty("Tolerance", -1.0), const std::invalid_argument &) + TS_ASSERT_THROWS(alg.setProperty("Tolerance", -1.0), + const std::invalid_argument &) } // It shouldn't be a problem to subtract identical workspaces. You just get an diff --git a/Framework/Crystal/test/PeakStatisticsToolsTest.h b/Framework/Crystal/test/PeakStatisticsToolsTest.h index b5cc0b7b8798061c510e195c279e7cbe1d8e0ecc..f028e99335da22cb2dd2c45a542f4c280729e9f5 100644 --- a/Framework/Crystal/test/PeakStatisticsToolsTest.h +++ b/Framework/Crystal/test/PeakStatisticsToolsTest.h @@ -134,8 +134,10 @@ public: void test_UniqueReflectionRemoveOutliersSigmaCrit() { UniqueReflection reflection(V3D(2, 3, 4)); TS_ASSERT_THROWS_NOTHING(reflection.removeOutliers(3.0)); - TS_ASSERT_THROWS(reflection.removeOutliers(0.0), const std::invalid_argument &); - TS_ASSERT_THROWS(reflection.removeOutliers(-10.0), const std::invalid_argument &); + TS_ASSERT_THROWS(reflection.removeOutliers(0.0), + const std::invalid_argument &); + TS_ASSERT_THROWS(reflection.removeOutliers(-10.0), + const std::invalid_argument &); } void test_UniqueReflectionRemoveOutliersFewPeaks() { diff --git a/Framework/Crystal/test/SetUBTest.h b/Framework/Crystal/test/SetUBTest.h index 5d81f1a62b6acfb9a845890540ee48fad17616af..c52b0876ae32bc49a8df88dd87134b1d753dc220 100644 --- a/Framework/Crystal/test/SetUBTest.h +++ b/Framework/Crystal/test/SetUBTest.h @@ -93,9 +93,10 @@ public: TS_ASSERT(alg.isInitialized()) TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Workspace", wsName)); - TS_ASSERT_THROWS(alg.setPropertyValue("UB", "1,1"), - const std::invalid_argument &); // should fail to initialize UB, - // since 9 elements are required + TS_ASSERT_THROWS( + alg.setPropertyValue("UB", "1,1"), + const std::invalid_argument &); // should fail to initialize UB, + // since 9 elements are required TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("UB", "0,0,2,0,4,0,-8,0,0")); TS_ASSERT_THROWS_NOTHING(alg.execute();); TS_ASSERT(alg.isExecuted()); @@ -140,9 +141,10 @@ public: TS_ASSERT(alg.isInitialized()) TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Workspace", wsName)); - TS_ASSERT_THROWS(alg.setPropertyValue("UB", "1,1"), - const std::invalid_argument &); // should fail to initialize UB, - // since 9 elements are required + TS_ASSERT_THROWS( + alg.setPropertyValue("UB", "1,1"), + const std::invalid_argument &); // should fail to initialize UB, + // since 9 elements are required TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("UB", "1,1,1,1,1,1,1,1,1")); TS_ASSERT_THROWS_NOTHING(alg.execute();); TS_ASSERT(!alg.isExecuted()); @@ -210,9 +212,10 @@ public: TS_ASSERT(alg.isInitialized()) TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Workspace", wsName)); - TS_ASSERT_THROWS(alg.setPropertyValue("alpha", "1"), - const std::invalid_argument &); // should fail to initialize alpha, - // since angle is too small + TS_ASSERT_THROWS( + alg.setPropertyValue("alpha", "1"), + const std::invalid_argument &); // should fail to initialize alpha, + // since angle is too small TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("alpha", "90.")); TS_ASSERT_THROWS( alg.setPropertyValue("u", "0,0,2,0,4,0,-8,0,0"), diff --git a/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h b/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h index 70bc9cab1f21a06cf6f5f3193e0111682844befb..19e388c1a14018671d4fc2f19fbbfa09ec579d9f 100644 --- a/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h +++ b/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h @@ -118,9 +118,11 @@ public: auto alg = createAlgorithm(); // Zero - TS_ASSERT_THROWS(alg->setProperty("Mass", 0.0), const std::invalid_argument &); + TS_ASSERT_THROWS(alg->setProperty("Mass", 0.0), + const std::invalid_argument &); // Negative - TS_ASSERT_THROWS(alg->setProperty("Mass", -0.1), const std::invalid_argument &); + TS_ASSERT_THROWS(alg->setProperty("Mass", -0.1), + const std::invalid_argument &); } void test_Input_Workspace_Not_In_TOF_Throws_Error() { diff --git a/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h b/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h index c77bdd6be4744a77cf540dd919470bdc85f60882..b4b0953f5786cc3477ac764fcde6297067cf568b 100644 --- a/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h +++ b/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h @@ -71,14 +71,16 @@ public: ConvolutionFitSequential alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); - TS_ASSERT_THROWS(alg.setPropertyValue("StartX", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setPropertyValue("StartX", ""), + const std::invalid_argument &); } void test_empty_endX_is_not_allowed() { ConvolutionFitSequential alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); - TS_ASSERT_THROWS(alg.setPropertyValue("EndX", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setPropertyValue("EndX", ""), + const std::invalid_argument &); } void test_empty_specMin_is_not_allowed() { diff --git a/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h b/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h index b89f0bf5de177f5b1e6b841e3202affef07b88f6..458484a4911e65b2d1f548762f05052425ea3c02 100644 --- a/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h +++ b/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h @@ -85,7 +85,8 @@ public: void testHistogramIsUsable() { TestableSeqDomainSpectrumCreator creator(nullptr, ""); - TS_ASSERT_THROWS(creator.histogramIsUsable(0), const std::invalid_argument &); + TS_ASSERT_THROWS(creator.histogramIsUsable(0), + const std::invalid_argument &); // Workspace with 2 histograms, one of which is masked (No. 0) std::set<int64_t> masked; diff --git a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h index 8e57f384ee984afb4a4d20a416a221362ef3a7dc..32ac0872104575b0945602e64efc98010ef59ff7 100644 --- a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h +++ b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h @@ -217,8 +217,10 @@ public: VesuvioCalculateMS alg; alg.initialize(); - TS_ASSERT_THROWS(alg.setProperty("NoOfMasses", -1), const std::invalid_argument &); - TS_ASSERT_THROWS(alg.setProperty("NoOfMasses", 0), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("NoOfMasses", -1), + const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("NoOfMasses", 0), + const std::invalid_argument &); } void test_setting_sampledensity_zero_or_negative_throws_invalid_argument() { @@ -251,7 +253,8 @@ public: TS_ASSERT_THROWS(alg.setProperty("BeamRadius", -1.5), const std::invalid_argument &); - TS_ASSERT_THROWS(alg.setProperty("BeamRadius", 0.0), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("BeamRadius", 0.0), + const std::invalid_argument &); } void test_input_workspace_with_detector_that_has_no_shape_throws_exception() { diff --git a/Framework/CurveFitting/test/ComplexMatrixTest.h b/Framework/CurveFitting/test/ComplexMatrixTest.h index 6bfe2098169244755a6597bdcc0e867cedd75fa8..8575f33831f71ff83b7326f2876f7d90f8c273a4 100644 --- a/Framework/CurveFitting/test/ComplexMatrixTest.h +++ b/Framework/CurveFitting/test/ComplexMatrixTest.h @@ -315,7 +315,8 @@ public: m.set(3, 2, 32); m.set(3, 3, 33); - TS_ASSERT_THROWS(ComplexMatrix subm(m, 2, 2, 3, 3), const std::runtime_error &); + TS_ASSERT_THROWS(ComplexMatrix subm(m, 2, 2, 3, 3), + const std::runtime_error &); } void test_eigenSystem_rectangular_throw() { diff --git a/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h b/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h index 420959d6acc277a906ad6b1239d371ad24d3d7d4..04204d51d524bc6cd1a62879054004127b40fbd0 100644 --- a/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h +++ b/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h @@ -85,7 +85,8 @@ public: BoundaryConstraint bc; Expression expr; expr.parse("Sigma==20"); - TS_ASSERT_THROWS(bc.initialize(&gaus, expr, false), const std::invalid_argument &); + TS_ASSERT_THROWS(bc.initialize(&gaus, expr, false), + const std::invalid_argument &); } void testInitialize6() { @@ -94,7 +95,8 @@ public: BoundaryConstraint bc; Expression expr; expr.parse("a<Sigma<b"); - TS_ASSERT_THROWS(bc.initialize(&gaus, expr, false), const std::invalid_argument &); + TS_ASSERT_THROWS(bc.initialize(&gaus, expr, false), + const std::invalid_argument &); } // test constructor with lower boundary only diff --git a/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h b/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h index 6cabd2b9991080c3e02e8aa1724d1c0139297adc..da215184e6f668d0c14fbaf84a8f7c0ad2e5d584 100644 --- a/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h +++ b/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h @@ -73,19 +73,22 @@ public: TestableFunctionDomain1DSpectrumCreator creator; // throws, because workspace and index are not set. - TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), const std::invalid_argument &); + TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), + const std::invalid_argument &); creator.setMatrixWorkspace( WorkspaceCreationHelper::create2DWorkspace123(10, 15)); // still throws, since workspace index has not been set explicitly. - TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), const std::invalid_argument &); + TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), + const std::invalid_argument &); creator.setWorkspaceIndex(4); TS_ASSERT_THROWS_NOTHING(creator.throwIfWorkspaceInvalid()); creator.setWorkspaceIndex(34); // throws also, because index is invalid - TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), const std::invalid_argument &); + TS_ASSERT_THROWS(creator.throwIfWorkspaceInvalid(), + const std::invalid_argument &); } void testGetDomainSize() { diff --git a/Framework/CurveFitting/test/Functions/BSplineTest.h b/Framework/CurveFitting/test/Functions/BSplineTest.h index cbf00ef1b483997939343aedc86562d25451b789..62e04d01339ce8fe303ac82a84dcef824cd2fed6 100644 --- a/Framework/CurveFitting/test/Functions/BSplineTest.h +++ b/Framework/CurveFitting/test/Functions/BSplineTest.h @@ -50,14 +50,18 @@ public: void test_nonpositive_order() { BSpline bsp; - TS_ASSERT_THROWS(bsp.setAttributeValue("Order", -3), const std::invalid_argument &); - TS_ASSERT_THROWS(bsp.setAttributeValue("Order", 0), const std::invalid_argument &); + TS_ASSERT_THROWS(bsp.setAttributeValue("Order", -3), + const std::invalid_argument &); + TS_ASSERT_THROWS(bsp.setAttributeValue("Order", 0), + const std::invalid_argument &); } void test_nbreak_too_small() { BSpline bsp; - TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", 1), const std::invalid_argument &); - TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", 0), const std::invalid_argument &); + TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", 1), + const std::invalid_argument &); + TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", 0), + const std::invalid_argument &); TS_ASSERT_THROWS(bsp.setAttributeValue("NBreak", -3), const std::invalid_argument &); } diff --git a/Framework/CurveFitting/test/Functions/ChebyshevTest.h b/Framework/CurveFitting/test/Functions/ChebyshevTest.h index 4a4729fff34e45ea9088f40aa37bde0cb7fb3d9f..d759933f5899a35e682f84d93fa780a40aa13786 100644 --- a/Framework/CurveFitting/test/Functions/ChebyshevTest.h +++ b/Framework/CurveFitting/test/Functions/ChebyshevTest.h @@ -41,15 +41,18 @@ public: Chebyshev cheb; cheb.initialize(); - TS_ASSERT_THROWS(cheb.setAttributeValue("A0", 3.3), const std::invalid_argument &); - TS_ASSERT_THROWS(cheb.setAttributeValue("n", -1), const std::invalid_argument &); + TS_ASSERT_THROWS(cheb.setAttributeValue("A0", 3.3), + const std::invalid_argument &); + TS_ASSERT_THROWS(cheb.setAttributeValue("n", -1), + const std::invalid_argument &); } void testZero() { Chebyshev cheb; cheb.initialize(); - TS_ASSERT_THROWS(cheb.setAttributeValue("A1", 3.3), const std::invalid_argument &); + TS_ASSERT_THROWS(cheb.setAttributeValue("A1", 3.3), + const std::invalid_argument &); TS_ASSERT_THROWS_NOTHING(cheb.setAttributeValue("n", 0)); } diff --git a/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h b/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h index 8ed1dae82fbf9be6ab8ee8a1e45caf7e4d0997f6..28fa0d98576ead096b2355dcfec2573f212ba851 100644 --- a/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h +++ b/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h @@ -40,13 +40,15 @@ public: void test_negative() { FullprofPolynomial tofbkgd; tofbkgd.initialize(); - TS_ASSERT_THROWS(tofbkgd.setAttributeValue("n", -3), const std::invalid_argument &); + TS_ASSERT_THROWS(tofbkgd.setAttributeValue("n", -3), + const std::invalid_argument &); } void test_zero() { FullprofPolynomial tofbkgd; tofbkgd.initialize(); - TS_ASSERT_THROWS(tofbkgd.setAttributeValue("n", 0), const std::runtime_error &); + TS_ASSERT_THROWS(tofbkgd.setAttributeValue("n", 0), + const std::runtime_error &); } void test_calculate() { diff --git a/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h b/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h index 0af361f36838f35c1007e977213cfa377e269016..15859cad4d288fd793002fd19604d4a12418422f 100644 --- a/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h +++ b/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h @@ -57,7 +57,8 @@ public: TSM_ASSERT_THROWS_NOTHING("Function should have a C_0 parameter", profile->getParameter("C_0")); TSM_ASSERT_THROWS("Function should not have a C_2 parameter", - profile->getParameter("C_2"), const std::invalid_argument &); + profile->getParameter("C_2"), + const std::invalid_argument &); TSM_ASSERT_THROWS_NOTHING("Function should have a C_4 parameter", profile->getParameter("C_4")); } diff --git a/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h b/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h index 45203365910204559b9fb0b20a6aa35f0ba4063a..be2085004833c5c2822728a64bde8a643049581f 100644 --- a/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h +++ b/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h @@ -44,7 +44,8 @@ public: lin.initialize(); // set up fitting function TS_ASSERT_THROWS(lin.setParameter("X", 1.0), const std::invalid_argument &); - TS_ASSERT_THROWS(lin.setParameter("A9", 1.0), const std::invalid_argument &); + TS_ASSERT_THROWS(lin.setParameter("A9", 1.0), + const std::invalid_argument &); const double a1 = 2; const double a0 = 0.3; diff --git a/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h b/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h index 0ec249d4e06987d4ac002032eb13a1e8b737f4d4..abb862138d95056955c3a4fab69766173737050d 100644 --- a/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h @@ -101,7 +101,8 @@ public: FunctionValues values(domain); Mantid::CurveFitting::Jacobian jacobian(domain.size(), 3); - TS_ASSERT_THROWS(fn->function(domain, values), const std::invalid_argument &); + TS_ASSERT_THROWS(fn->function(domain, values), + const std::invalid_argument &); TS_ASSERT_THROWS(fn->functionDeriv(domain, jacobian), const std::invalid_argument &); } @@ -119,7 +120,8 @@ public: Mantid::CurveFitting::Jacobian jacobian(domain.size(), 3); TS_ASSERT_THROWS(fn->function(domain, values), const std::runtime_error &); - TS_ASSERT_THROWS(fn->functionDeriv(domain, jacobian), const std::runtime_error &); + TS_ASSERT_THROWS(fn->functionDeriv(domain, jacobian), + const std::runtime_error &); } void testBeforeDecoratedFunctionSet() { diff --git a/Framework/CurveFitting/test/Functions/PolynomialTest.h b/Framework/CurveFitting/test/Functions/PolynomialTest.h index c1ceb3789fa393572115c201c834ce855f592faf..6f524d7c9876944a99963f0f0f14fb118f64d916 100644 --- a/Framework/CurveFitting/test/Functions/PolynomialTest.h +++ b/Framework/CurveFitting/test/Functions/PolynomialTest.h @@ -41,11 +41,13 @@ public: TS_ASSERT_THROWS(pol.setParameter("X", 1.0), const std::invalid_argument &); TS_ASSERT_THROWS_NOTHING(pol.setAttributeValue("n", 3)); - TS_ASSERT_THROWS(pol.setParameter("A99", 0.0), const std::invalid_argument &); + TS_ASSERT_THROWS(pol.setParameter("A99", 0.0), + const std::invalid_argument &); Polynomial pol2; pol2.initialize(); - TS_ASSERT_THROWS(pol2.setAttributeValue("n", -1), const std::invalid_argument &); + TS_ASSERT_THROWS(pol2.setAttributeValue("n", -1), + const std::invalid_argument &); Polynomial pol3; pol3.initialize(); diff --git a/Framework/CurveFitting/test/Functions/QuadraticTest.h b/Framework/CurveFitting/test/Functions/QuadraticTest.h index 52647767f661c766ff7bb5f27681f5d4df3e33ea..bc39d06cb8bd97d75b9f832b645a652384df40a5 100644 --- a/Framework/CurveFitting/test/Functions/QuadraticTest.h +++ b/Framework/CurveFitting/test/Functions/QuadraticTest.h @@ -39,9 +39,12 @@ public: Quadratic quad; quad.initialize(); - TS_ASSERT_THROWS(quad.setParameter("X", 1.0), const std::invalid_argument &); - TS_ASSERT_THROWS(quad.setAttributeValue("n", 3), const std::invalid_argument &); - TS_ASSERT_THROWS(quad.setParameter("A99", 0.0), const std::invalid_argument &); + TS_ASSERT_THROWS(quad.setParameter("X", 1.0), + const std::invalid_argument &); + TS_ASSERT_THROWS(quad.setAttributeValue("n", 3), + const std::invalid_argument &); + TS_ASSERT_THROWS(quad.setParameter("A99", 0.0), + const std::invalid_argument &); } void test_calculate() { diff --git a/Framework/CurveFitting/test/HistogramDomainCreatorTest.h b/Framework/CurveFitting/test/HistogramDomainCreatorTest.h index 67490806d4a71c4bb6099e3781ff4251d0a71963..48dcdc3283a5eab1722f399bb30b04d59e2e6ccb 100644 --- a/Framework/CurveFitting/test/HistogramDomainCreatorTest.h +++ b/Framework/CurveFitting/test/HistogramDomainCreatorTest.h @@ -69,7 +69,8 @@ public: manager.setProperty("InputWorkspace", ws); FunctionDomain_sptr domain; FunctionValues_sptr values; - TS_ASSERT_THROWS(creator.createDomain(domain, values), const std::runtime_error &); + TS_ASSERT_THROWS(creator.createDomain(domain, values), + const std::runtime_error &); } void test_domain_values() { diff --git a/Framework/DataHandling/src/LoadNexusLogs.cpp b/Framework/DataHandling/src/LoadNexusLogs.cpp index 17a6176c1c9171e1b770b2789cbe1d7f6e9bb64e..35b6b2aaa41b02a37c3e0edb6d9faf9a0eb7f106 100644 --- a/Framework/DataHandling/src/LoadNexusLogs.cpp +++ b/Framework/DataHandling/src/LoadNexusLogs.cpp @@ -32,8 +32,8 @@ using API::FileProperty; using API::MatrixWorkspace; using API::MatrixWorkspace_sptr; using API::WorkspaceProperty; -using std::size_t; using Types::Core::DateAndTime; +using std::size_t; // Anonymous namespace namespace { diff --git a/Framework/DataHandling/test/LoadEventNexusTest.h b/Framework/DataHandling/test/LoadEventNexusTest.h index fca76fd3906c5ab9769eb923d50392bf9e876e20..4c1f5a8bf3d40b8c1d7e0e47d18a812387120d73 100644 --- a/Framework/DataHandling/test/LoadEventNexusTest.h +++ b/Framework/DataHandling/test/LoadEventNexusTest.h @@ -349,7 +349,8 @@ public: // Test that asking not to load the logs did what it should // Make sure that we throw if we try to read a log (that shouldn't be there) - TS_ASSERT_THROWS(WS->getLog("proton_charge"), const std::invalid_argument &); + TS_ASSERT_THROWS(WS->getLog("proton_charge"), + const std::invalid_argument &); //----- Now we re-load with precounting and compare memory use ---- LoadEventNexus ld2; diff --git a/Framework/DataHandling/test/LoadSampleEnvironmentTest.h b/Framework/DataHandling/test/LoadSampleEnvironmentTest.h index 60c68b9965fcb778203e2f28cb0563cb2051a242..831af331b37bd36c81fcbaa1bdb4384885657cfb 100644 --- a/Framework/DataHandling/test/LoadSampleEnvironmentTest.h +++ b/Framework/DataHandling/test/LoadSampleEnvironmentTest.h @@ -86,7 +86,8 @@ public: alg.setProperty("RotationMatrix", "-1,0,1,0,0,0,0,1"); boost::shared_ptr<MeshObject> environmentMesh = nullptr; environmentMesh = loadCube(); - TS_ASSERT_THROWS(alg.rotate(environmentMesh), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.rotate(environmentMesh), + const std::invalid_argument &); } void testRotateFailInvalidMatrix() { @@ -95,7 +96,8 @@ public: alg.setProperty("RotationMatrix", "6,1,1,4,-2,5,2,8,7"); boost::shared_ptr<MeshObject> environmentMesh = nullptr; environmentMesh = loadCube(); - TS_ASSERT_THROWS(alg.rotate(environmentMesh), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.rotate(environmentMesh), + const std::invalid_argument &); } void testSetMaterial() { diff --git a/Framework/DataHandling/test/RemoveLogsTest.h b/Framework/DataHandling/test/RemoveLogsTest.h index b5305f9d25532c7830494f078727d6e935e3436b..173c1883739c14a0e0f1cc66777a2d92ae624b8c 100644 --- a/Framework/DataHandling/test/RemoveLogsTest.h +++ b/Framework/DataHandling/test/RemoveLogsTest.h @@ -110,8 +110,10 @@ public: // Ensure it has the correct log data TS_ASSERT_DIFFERS(output->run().getLogData().size(), 0); - TS_ASSERT_THROWS(output->run().getLogData("some_prop"), const std::runtime_error &); - TS_ASSERT_THROWS(output->run().getLogData("T0"), const std::runtime_error &); + TS_ASSERT_THROWS(output->run().getLogData("some_prop"), + const std::runtime_error &); + TS_ASSERT_THROWS(output->run().getLogData("T0"), + const std::runtime_error &); TS_ASSERT_THROWS_NOTHING(output->run().getLogData("Ei")); TS_ASSERT_THROWS_NOTHING(output->run().getLogData("scan_index")); diff --git a/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h b/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h index 65f4fe262aa255d55c580753b2e43187ed60bbb4..f8b3191eafd947f6d62af3c54a13f09df647decb 100644 --- a/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h +++ b/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h @@ -204,7 +204,8 @@ private: loadTestInstrument(); // No header - TS_ASSERT_THROWS(runUpdateInstrument(filename), const std::invalid_argument &); + TS_ASSERT_THROWS(runUpdateInstrument(filename), + const std::invalid_argument &); // Header claims fewer columns than there actually are std::string badHeader = "spectrum,theta,t0,-"; diff --git a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h index cf43f57c787ecd1000edc3e645ca6d3c6ba26fd4..9d872820d4557c51d344acec59457e73d1c2a7f4 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h @@ -1093,7 +1093,7 @@ operator++() noexcept(is_same<Signed, unsigned>::value) { template <size_t Bits, typename Signed> constexpr wide_integer<Bits, Signed> wide_integer<Bits, Signed>:: -operator++(int) noexcept(is_same<Signed, unsigned>::value) { +operator++(int)noexcept(is_same<Signed, unsigned>::value) { auto tmp = *this; *this = _impl::operator_plus(*this, 1); return tmp; @@ -1108,7 +1108,7 @@ operator--() noexcept(is_same<Signed, unsigned>::value) { template <size_t Bits, typename Signed> constexpr wide_integer<Bits, Signed> wide_integer<Bits, Signed>:: -operator--(int) noexcept(is_same<Signed, unsigned>::value) { +operator--(int)noexcept(is_same<Signed, unsigned>::value) { auto tmp = *this; *this = _impl::operator_minus(*this, 1); return tmp; diff --git a/Framework/DataObjects/test/AffineMatrixParameterParserTest.h b/Framework/DataObjects/test/AffineMatrixParameterParserTest.h index 40863f9c3c6b5576f024e07d4fed1cd09951499d..fc28387d56a7631b2456152ced399a87304aead1 100644 --- a/Framework/DataObjects/test/AffineMatrixParameterParserTest.h +++ b/Framework/DataObjects/test/AffineMatrixParameterParserTest.h @@ -120,7 +120,8 @@ public: AffineMatrixParameterParser parser; - TS_ASSERT_THROWS(parser.createParameter(pRootElem), const std::runtime_error &); + TS_ASSERT_THROWS(parser.createParameter(pRootElem), + const std::runtime_error &); } }; #endif diff --git a/Framework/DataObjects/test/BoxControllerNeXusIOTest.h b/Framework/DataObjects/test/BoxControllerNeXusIOTest.h index 4f54deb50e7ede4d1a49914a8063bec45b369d52..e5b69f1c3829e1f6c442556e25520729b9c6c1fa 100644 --- a/Framework/DataObjects/test/BoxControllerNeXusIOTest.h +++ b/Framework/DataObjects/test/BoxControllerNeXusIOTest.h @@ -75,10 +75,10 @@ public: } void test_CreateOrOpenFile() { - using Mantid::coord_t; using Mantid::API::FileFinder; using Mantid::DataObjects::BoxControllerNeXusIO; using Mantid::Kernel::Exception::FileError; + using Mantid::coord_t; BoxControllerNeXusIO *pSaver(nullptr); TS_ASSERT_THROWS_NOTHING(pSaver = createTestBoxController()); diff --git a/Framework/DataObjects/test/CoordTransformAffineParserTest.h b/Framework/DataObjects/test/CoordTransformAffineParserTest.h index fb0222aabd4607f497179a1e1c1f155ef9bb7e0a..5b84265f64860d3d214c66f8a0c52720ddf56804 100644 --- a/Framework/DataObjects/test/CoordTransformAffineParserTest.h +++ b/Framework/DataObjects/test/CoordTransformAffineParserTest.h @@ -77,7 +77,8 @@ public: CoordTransformAffineParser parser; TSM_ASSERT_THROWS("XML root node must be a coordinate transform", - parser.createTransform(pRootElem), const std::invalid_argument &); + parser.createTransform(pRootElem), + const std::invalid_argument &); } void testNoSuccessorThrows() { @@ -95,7 +96,8 @@ public: CoordTransformAffineParser parser; TSM_ASSERT_THROWS("Should throw since no successor parser has been set", - parser.createTransform(pRootElem), const std::runtime_error &); + parser.createTransform(pRootElem), + const std::runtime_error &); } void testDelegateToSuccessor() { diff --git a/Framework/DataObjects/test/CoordTransformDistanceParserTest.h b/Framework/DataObjects/test/CoordTransformDistanceParserTest.h index 4d93577dc75c27dee26d1e00ca074141b54f16ce..0f9a21bada9530ce294252a7feaa85e1f1b83f39 100644 --- a/Framework/DataObjects/test/CoordTransformDistanceParserTest.h +++ b/Framework/DataObjects/test/CoordTransformDistanceParserTest.h @@ -69,7 +69,8 @@ public: CoordTransformDistanceParser parser; TSM_ASSERT_THROWS("XML root node must be a coordinate transform", - parser.createTransform(pRootElem), const std::invalid_argument &); + parser.createTransform(pRootElem), + const std::invalid_argument &); } void testNoSuccessorThrows() { @@ -87,7 +88,8 @@ public: CoordTransformDistanceParser parser; TSM_ASSERT_THROWS("Should throw since no successor parser has been set", - parser.createTransform(pRootElem), const std::runtime_error &); + parser.createTransform(pRootElem), + const std::runtime_error &); } void testDelegateToSuccessor() { diff --git a/Framework/DataObjects/test/EventListTest.h b/Framework/DataObjects/test/EventListTest.h index fd513f6df3b94b5910cb63db73608bd140feb9dc..29d27918d15921f597cb85495c616251327ee5ba 100644 --- a/Framework/DataObjects/test/EventListTest.h +++ b/Framework/DataObjects/test/EventListTest.h @@ -115,7 +115,8 @@ public: TS_ASSERT_EQUALS(target.getSortType(), eventList.getSortType()); TS_ASSERT_EQUALS(target.getEvents(), eventList.getEvents()); TS_ASSERT_THROWS(target.getWeightedEvents(), const std::runtime_error &); - TS_ASSERT_THROWS(target.getWeightedEventsNoTime(), const std::runtime_error &); + TS_ASSERT_THROWS(target.getWeightedEventsNoTime(), + const std::runtime_error &); eventList.switchTo(EventType::WEIGHTED); target.copyDataFrom(eventList); @@ -123,7 +124,8 @@ public: TS_ASSERT_EQUALS(target.getSortType(), eventList.getSortType()); TS_ASSERT_THROWS(target.getEvents(), const std::runtime_error &); TS_ASSERT_EQUALS(target.getWeightedEvents(), eventList.getWeightedEvents()); - TS_ASSERT_THROWS(target.getWeightedEventsNoTime(), const std::runtime_error &); + TS_ASSERT_THROWS(target.getWeightedEventsNoTime(), + const std::runtime_error &); eventList.switchTo(EventType::WEIGHTED_NOTIME); target.copyDataFrom(eventList); @@ -296,11 +298,13 @@ public: TS_ASSERT_EQUALS(el.getEvents().size(), NUMEVENTS); TS_ASSERT_EQUALS(el.getNumberEvents(), NUMEVENTS); TS_ASSERT_THROWS(el.getWeightedEvents().size(), const std::runtime_error &); - TS_ASSERT_THROWS(el.getWeightedEventsNoTime().size(), const std::runtime_error &); + TS_ASSERT_THROWS(el.getWeightedEventsNoTime().size(), + const std::runtime_error &); el.switchTo(WEIGHTED); TS_ASSERT_THROWS(el.getEvents().size(), const std::runtime_error &); - TS_ASSERT_THROWS(el.getWeightedEventsNoTime().size(), const std::runtime_error &); + TS_ASSERT_THROWS(el.getWeightedEventsNoTime().size(), + const std::runtime_error &); TS_ASSERT_EQUALS(el.getWeightedEvents().size(), NUMEVENTS); TS_ASSERT_EQUALS(el.getNumberEvents(), NUMEVENTS); TS_ASSERT_EQUALS(el.getEvent(0).weight(), 1.0); @@ -1683,7 +1687,8 @@ public: } void test_filterByPulseTime_output_same_as_input_throws() { - TS_ASSERT_THROWS(el.filterByPulseTime(100, 200, el), const std::invalid_argument &); + TS_ASSERT_THROWS(el.filterByPulseTime(100, 200, el), + const std::invalid_argument &); } void test_filter_by_time_at_sample_behaves_like_filter_by_pulse_time() { @@ -1940,7 +1945,8 @@ public: if (curType == WEIGHTED_NOTIME) { // Error cause no time - TS_ASSERT_THROWS(el.splitByTime(split, outputs), const std::runtime_error &); + TS_ASSERT_THROWS(el.splitByTime(split, outputs), + const std::runtime_error &); } else { // Do the splitting TS_ASSERT_THROWS_NOTHING(el.splitByTime(split, outputs);); @@ -2714,7 +2720,8 @@ public: el.setHistogram(HistogramData::BinEdges{0, 2}); TS_ASSERT_THROWS(el.setCounts(1), const std::runtime_error &); TS_ASSERT_THROWS(el.setCountVariances(1), const std::runtime_error &); - TS_ASSERT_THROWS(el.setCountStandardDeviations(1), const std::runtime_error &); + TS_ASSERT_THROWS(el.setCountStandardDeviations(1), + const std::runtime_error &); } void test_setFrequencies_fails() { @@ -2722,7 +2729,8 @@ public: el.setHistogram(HistogramData::BinEdges{0, 2}); TS_ASSERT_THROWS(el.setFrequencies(1), const std::runtime_error &); TS_ASSERT_THROWS(el.setFrequencyVariances(1), const std::runtime_error &); - TS_ASSERT_THROWS(el.setFrequencyStandardDeviations(1), const std::runtime_error &); + TS_ASSERT_THROWS(el.setFrequencyStandardDeviations(1), + const std::runtime_error &); } void test_setShared_fails() { diff --git a/Framework/DataObjects/test/MDBoxTest.h b/Framework/DataObjects/test/MDBoxTest.h index ac10602c6bf5d8dc3ecf0596ea32ce625bd94509..5997ec3b9da018e9bf7629a31f61548795a6e72e 100644 --- a/Framework/DataObjects/test/MDBoxTest.h +++ b/Framework/DataObjects/test/MDBoxTest.h @@ -380,7 +380,8 @@ public: sc->setSplitThreshold(10); using MACROS_ARE_DUMB = MDBox<MDLeanEvent<3>, 3>; //...since they get confused by commas - TS_ASSERT_THROWS(MACROS_ARE_DUMB b3(sc.get()), const std::invalid_argument &); + TS_ASSERT_THROWS(MACROS_ARE_DUMB b3(sc.get()), + const std::invalid_argument &); } void test_splitter() { diff --git a/Framework/DataObjects/test/Workspace2DTest.h b/Framework/DataObjects/test/Workspace2DTest.h index 4d20342d65570b3a7813d968cab3b1eb5977ac0b..38a40903c8d442235f08e28c5ff68644a89c01f2 100644 --- a/Framework/DataObjects/test/Workspace2DTest.h +++ b/Framework/DataObjects/test/Workspace2DTest.h @@ -26,8 +26,8 @@ using namespace Mantid::Geometry; using namespace Mantid::HistogramData; using namespace Mantid::Kernel; using namespace Mantid::API; -using HistogramData::Counts; using HistogramData::CountStandardDeviations; +using HistogramData::Counts; using HistogramData::LinearGenerator; using WorkspaceCreationHelper::create2DWorkspaceBinned; diff --git a/Framework/Geometry/test/BasicHKLFiltersTest.h b/Framework/Geometry/test/BasicHKLFiltersTest.h index 56c4d71f323accf2d8b5b046665d0f9eb52700a3..a65697004390bd9d9f7cb653cafc6c48f12bf29e 100644 --- a/Framework/Geometry/test/BasicHKLFiltersTest.h +++ b/Framework/Geometry/test/BasicHKLFiltersTest.h @@ -22,9 +22,9 @@ using namespace Mantid::Geometry; using namespace Mantid::Kernel; -using ::testing::_; using ::testing::Mock; using ::testing::Return; +using ::testing::_; class BasicHKLFiltersTest : public CxxTest::TestSuite { public: diff --git a/Framework/Geometry/test/GoniometerTest.h b/Framework/Geometry/test/GoniometerTest.h index b5936cb419b5d84838281a89e32ddd7fba594d45..31ce1389065b6a98014e2642c70df896d45d7a44 100644 --- a/Framework/Geometry/test/GoniometerTest.h +++ b/Framework/Geometry/test/GoniometerTest.h @@ -37,7 +37,8 @@ public: M.identityMatrix(); TS_ASSERT(!G.isDefined()); TS_ASSERT_EQUALS(G.getR(), M); - TS_ASSERT_THROWS(G.setRotationAngle("Axis4", 3), const std::invalid_argument &); + TS_ASSERT_THROWS(G.setRotationAngle("Axis4", 3), + const std::invalid_argument &); TS_ASSERT_THROWS_ANYTHING(G.setRotationAngle(1, 2)); TS_ASSERT_EQUALS((G.axesInfo()).compare("No axis is found\n"), 0); TS_ASSERT(!G.isDefined()); diff --git a/Framework/Geometry/test/IMDDimensionFactoryTest.h b/Framework/Geometry/test/IMDDimensionFactoryTest.h index 6e4a4f7ebcbb0f1725ad99cb9deb8879b3f3ff53..e20904c5dec7b8af11010c17a6c4af6a60378821 100644 --- a/Framework/Geometry/test/IMDDimensionFactoryTest.h +++ b/Framework/Geometry/test/IMDDimensionFactoryTest.h @@ -118,7 +118,8 @@ public: TS_ASSERT_THROWS(createDimension(missingID), const std::invalid_argument &); std::string missingName = constructNonReciprocalDimensionXMLString().erase(19, 19); - TS_ASSERT_THROWS(createDimension(missingName), const std::invalid_argument &); + TS_ASSERT_THROWS(createDimension(missingName), + const std::invalid_argument &); std::string missingUpperBounds = constructNonReciprocalDimensionXMLString().erase(38, 30); TS_ASSERT_THROWS(createDimension(missingUpperBounds), diff --git a/Framework/Geometry/test/InstrumentRayTracerTest.h b/Framework/Geometry/test/InstrumentRayTracerTest.h index dd66f76c2d0010de9ff159ad435e7f37f7fbeb26..1a747999f07a190d1092c1061c616d5373c2eb36 100644 --- a/Framework/Geometry/test/InstrumentRayTracerTest.h +++ b/Framework/Geometry/test/InstrumentRayTracerTest.h @@ -54,7 +54,8 @@ public: void test_That_Constructor_Throws_Invalid_Argument_On_Giving_An_Instrument_With_No_Source() { Instrument_sptr testInst(new Instrument("empty")); - TS_ASSERT_THROWS(new InstrumentRayTracer(testInst), const std::invalid_argument &); + TS_ASSERT_THROWS(new InstrumentRayTracer(testInst), + const std::invalid_argument &); } void diff --git a/Framework/Geometry/test/InstrumentTest.h b/Framework/Geometry/test/InstrumentTest.h index a5d589fbf2e8ef18a44dd42a0c6f48a097bc6973..19be53a812e77241594c7eedef31dca6c469792c 100644 --- a/Framework/Geometry/test/InstrumentTest.h +++ b/Framework/Geometry/test/InstrumentTest.h @@ -137,7 +137,8 @@ public: TS_ASSERT(!i.getSource()); ObjComponent *s = new ObjComponent(""); // Cannot have an unnamed source - TS_ASSERT_THROWS(i.markAsSource(s), const Exception::InstrumentDefinitionError &); + TS_ASSERT_THROWS(i.markAsSource(s), + const Exception::InstrumentDefinitionError &); s->setName("source"); TS_ASSERT_THROWS_NOTHING(i.markAsSource(s)); TS_ASSERT_EQUALS(i.getSource().get(), s); diff --git a/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h b/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h index 078d8a3d1a16fcab2f9938ec701b3e2a64f87830..33c7456775b1da9a1fc89d66caad1faf435cb18a 100644 --- a/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h +++ b/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h @@ -76,7 +76,8 @@ public: TS_ASSERT_THROWS_NOTHING(scatterer->setProperty("U", 1.23e12)); TS_ASSERT_THROWS_NOTHING(scatterer->setProperty("U", 1.23e-2)); - TS_ASSERT_THROWS(scatterer->setProperty("U", -0.2), const std::invalid_argument &); + TS_ASSERT_THROWS(scatterer->setProperty("U", -0.2), + const std::invalid_argument &); } void testCreate() { diff --git a/Framework/Geometry/test/MDGeometryXMLBuilderTest.h b/Framework/Geometry/test/MDGeometryXMLBuilderTest.h index 992a8e589a257ea4b724f87ab3cc3c3641e49d76..3c1e410ddc53e3624742ed0cd725de77dfd31245 100644 --- a/Framework/Geometry/test/MDGeometryXMLBuilderTest.h +++ b/Framework/Geometry/test/MDGeometryXMLBuilderTest.h @@ -187,16 +187,20 @@ public: MDGeometryBuilderXML<StrictDimensionPolicy> builder; TSM_ASSERT_THROWS("Strict policy should prevent add of a dimension to the " "x mapping, which is integrated.", - builder.addXDimension(dimension), const std::invalid_argument &); + builder.addXDimension(dimension), + const std::invalid_argument &); TSM_ASSERT_THROWS("Strict policy should prevent add of a dimension to the " "y mapping, which is integrated.", - builder.addYDimension(dimension), const std::invalid_argument &); + builder.addYDimension(dimension), + const std::invalid_argument &); TSM_ASSERT_THROWS("Strict policy should prevent add of a dimension to the " "z mapping, which is integrated.", - builder.addZDimension(dimension), const std::invalid_argument &); + builder.addZDimension(dimension), + const std::invalid_argument &); TSM_ASSERT_THROWS("Strict policy should prevent add of a dimension to the " "t mapping, which is integrated.", - builder.addTDimension(dimension), const std::invalid_argument &); + builder.addTDimension(dimension), + const std::invalid_argument &); } // Same as test above, but shouldn't throw. diff --git a/Framework/Geometry/test/ParDetectorTest.h b/Framework/Geometry/test/ParDetectorTest.h index cd16a899d8754f1ab845eb9d844471c5149e9cc1..6a41227615947ed9b8095c583cc31fc4a6049cb1 100644 --- a/Framework/Geometry/test/ParDetectorTest.h +++ b/Framework/Geometry/test/ParDetectorTest.h @@ -66,7 +66,8 @@ public: // Reading and writing masking should throw: Masking is now stored in // DetectorInfo and ParameterMap should reject it. TS_ASSERT_THROWS(pmap->get(&det, "masked"), const std::runtime_error &); - TS_ASSERT_THROWS(pmap->addBool(&det, "masked", true), const std::runtime_error &); + TS_ASSERT_THROWS(pmap->addBool(&det, "masked", true), + const std::runtime_error &); } void testGetNumberParameter() { diff --git a/Framework/Geometry/test/SampleEnvironmentSpecParserTest.h b/Framework/Geometry/test/SampleEnvironmentSpecParserTest.h index c3d3c063fe7cb1a5ca43589cff74ee8405d56aff..eb53f59e3d3b6d720ffcd616a58aee49d72f056a 100644 --- a/Framework/Geometry/test/SampleEnvironmentSpecParserTest.h +++ b/Framework/Geometry/test/SampleEnvironmentSpecParserTest.h @@ -246,7 +246,8 @@ public: std::string xml; std::istringstream instream(xml); SampleEnvironmentSpecParser parser; - TS_ASSERT_THROWS(parser.parse("name", instream), const std::runtime_error &); + TS_ASSERT_THROWS(parser.parse("name", instream), + const std::runtime_error &); } void test_Root_Tag_Must_Be_EnvironmentSpec() { diff --git a/Framework/Geometry/test/SampleEnvironmentSpecTest.h b/Framework/Geometry/test/SampleEnvironmentSpecTest.h index fb06d6f834f0449d695b444d6f61846588096295..f72f21679bfae3a7c269c78e437d8a1f890f764c 100644 --- a/Framework/Geometry/test/SampleEnvironmentSpecTest.h +++ b/Framework/Geometry/test/SampleEnvironmentSpecTest.h @@ -89,7 +89,8 @@ public: SampleEnvironmentSpec spec("CRYO-001"); auto testContainer = boost::make_shared<const Container>(""); - TS_ASSERT_THROWS(spec.addContainer(testContainer), const std::invalid_argument &); + TS_ASSERT_THROWS(spec.addContainer(testContainer), + const std::invalid_argument &); } void test_Find_Throws_If_ID_Not_Found() { @@ -103,7 +104,8 @@ public: using Mantid::Geometry::Container; SampleEnvironmentSpec spec("CRYO-001"); - TS_ASSERT_THROWS(spec.buildEnvironment("8mm"), const std::invalid_argument &); + TS_ASSERT_THROWS(spec.buildEnvironment("8mm"), + const std::invalid_argument &); } }; diff --git a/Framework/HistogramData/test/HistogramTest.h b/Framework/HistogramData/test/HistogramTest.h index 248b52aacbb857599c31b132b461ac788c93563e..684445e5191d9e3ec7f814e1974c727a776fe87b 100644 --- a/Framework/HistogramData/test/HistogramTest.h +++ b/Framework/HistogramData/test/HistogramTest.h @@ -14,20 +14,20 @@ #include "MantidHistogramData/LinearGenerator.h" using Mantid::HistogramData::BinEdges; -using Mantid::HistogramData::Counts; using Mantid::HistogramData::CountStandardDeviations; using Mantid::HistogramData::CountVariances; +using Mantid::HistogramData::Counts; using Mantid::HistogramData::Frequencies; using Mantid::HistogramData::FrequencyStandardDeviations; using Mantid::HistogramData::FrequencyVariances; -using Mantid::HistogramData::getHistogramXMode; using Mantid::HistogramData::Histogram; using Mantid::HistogramData::HistogramE; using Mantid::HistogramData::HistogramX; using Mantid::HistogramData::HistogramY; using Mantid::HistogramData::LinearGenerator; -using Mantid::HistogramData::Points; using Mantid::HistogramData::PointStandardDeviations; +using Mantid::HistogramData::Points; +using Mantid::HistogramData::getHistogramXMode; class HistogramTest : public CxxTest::TestSuite { public: diff --git a/Framework/Indexing/test/IndexInfoTest.h b/Framework/Indexing/test/IndexInfoTest.h index 696459151c6897354430fb51736ded820b0a5dbd..a0c38a4052547e96aa5d1c5bebdb9bbf23300ba9 100644 --- a/Framework/Indexing/test/IndexInfoTest.h +++ b/Framework/Indexing/test/IndexInfoTest.h @@ -283,13 +283,15 @@ public: // break some things, so we forbid this for now. IndexInfo info(3); Kernel::cow_ptr<std::vector<SpectrumDefinition>> defs{nullptr}; - TS_ASSERT_THROWS(info.setSpectrumDefinitions(defs), const std::runtime_error &); + TS_ASSERT_THROWS(info.setSpectrumDefinitions(defs), + const std::runtime_error &); } void test_setSpectrumDefinitions_size_mismatch_cow_ptr() { IndexInfo info(3); const auto defs = Kernel::make_cow<std::vector<SpectrumDefinition>>(2); - TS_ASSERT_THROWS(info.setSpectrumDefinitions(defs), const std::runtime_error &); + TS_ASSERT_THROWS(info.setSpectrumDefinitions(defs), + const std::runtime_error &); } void test_setSpectrumDefinitions_cow_ptr() { diff --git a/Framework/Kernel/test/BinaryFileTest.h b/Framework/Kernel/test/BinaryFileTest.h index cb160d0f8cc82b29390170bb443d9819184f1ee7..f4481953557d41ee1a174ab5ca37ef30bc929ed1 100644 --- a/Framework/Kernel/test/BinaryFileTest.h +++ b/Framework/Kernel/test/BinaryFileTest.h @@ -62,7 +62,8 @@ public: BinaryFileTest() { dummy_file = "dummy.bin"; } void testFileNotFound() { - TS_ASSERT_THROWS(file.open("nonexistentfile.dat"), const std::invalid_argument &); + TS_ASSERT_THROWS(file.open("nonexistentfile.dat"), + const std::invalid_argument &); } void testFileWrongSize() { @@ -185,7 +186,8 @@ public: DasEvent *buffer = nullptr; TS_ASSERT_EQUALS(file2.getNumElements(), 0); TS_ASSERT_THROWS(file2.loadAll(), const std::runtime_error &); - TS_ASSERT_THROWS(data = file2.loadAllIntoVector(), const std::runtime_error &); + TS_ASSERT_THROWS(data = file2.loadAllIntoVector(), + const std::runtime_error &); TS_ASSERT_THROWS(file2.loadBlock(buffer, 10), const std::runtime_error &); } }; diff --git a/Framework/Kernel/test/BinaryStreamReaderTest.h b/Framework/Kernel/test/BinaryStreamReaderTest.h index dd915b98f00c39085f1ee95f495e9adad740ef5a..8ba84f27e3a741463185b6925505dfa783eb253c 100644 --- a/Framework/Kernel/test/BinaryStreamReaderTest.h +++ b/Framework/Kernel/test/BinaryStreamReaderTest.h @@ -239,7 +239,8 @@ public: int i(0); m_bytes >> i; TSM_ASSERT_THROWS("Expected a runtime_error when given a bad stream", - BinaryStreamReader reader(m_bytes), const std::runtime_error &); + BinaryStreamReader reader(m_bytes), + const std::runtime_error &); } private: diff --git a/Framework/Kernel/test/DateAndTimeTest.h b/Framework/Kernel/test/DateAndTimeTest.h index 655b89a291f9cffbbb9d042613ea69f87708fc90..d069bb62caa320e80c50760212f6b35570382ad1 100644 --- a/Framework/Kernel/test/DateAndTimeTest.h +++ b/Framework/Kernel/test/DateAndTimeTest.h @@ -64,7 +64,8 @@ public: } void test_constructor_fails_invalid_string() { - TS_ASSERT_THROWS(DateAndTime("invalid time string"), const std::invalid_argument &); + TS_ASSERT_THROWS(DateAndTime("invalid time string"), + const std::invalid_argument &); TS_ASSERT_THROWS(DateAndTime("1909-01-31 22:59:59"), const std::invalid_argument &); TS_ASSERT_THROWS(DateAndTime("2017-09-27T 07:03:49+00:00"), diff --git a/Framework/Kernel/test/DynamicFactoryTest.h b/Framework/Kernel/test/DynamicFactoryTest.h index 2aaa564606c1ac9685142aade773973bcb28a8eb..628e148d14d3fa5dbf4b83d741f555433d387863 100644 --- a/Framework/Kernel/test/DynamicFactoryTest.h +++ b/Framework/Kernel/test/DynamicFactoryTest.h @@ -57,9 +57,10 @@ public: TS_ASSERT_THROWS(caseSensitiveFactory.create("testEntryCaseSensitive"), const std::runtime_error &) caseSensitiveFactory.subscribe<int>("testEntryCaseSensitive"); - TS_ASSERT_THROWS( - int_ptr i = caseSensitiveFactory.create("testEntryCaseSENSITIVE"), - const std::runtime_error &); // case error on a case sensitive dynamic factory + TS_ASSERT_THROWS(int_ptr i = + caseSensitiveFactory.create("testEntryCaseSENSITIVE"), + const std::runtime_error + &); // case error on a case sensitive dynamic factory TS_ASSERT_THROWS_NOTHING( int_ptr i2 = caseSensitiveFactory.create("testEntryCaseSensitive")); caseSensitiveFactory.unsubscribe("testEntryCaseSensitive"); @@ -85,10 +86,10 @@ public: const std::runtime_error &) caseSensitiveFactory.subscribe<int>("testUnrappedEntryCaseSensitive"); int *i = nullptr; - TS_ASSERT_THROWS( - i = caseSensitiveFactory.createUnwrapped( - "testUnrappedentrycaseSENSITIVE"), - const std::runtime_error &); // case error on a case sensitive dynamic factory + TS_ASSERT_THROWS(i = caseSensitiveFactory.createUnwrapped( + "testUnrappedentrycaseSENSITIVE"), + const std::runtime_error + &); // case error on a case sensitive dynamic factory TS_ASSERT_THROWS_NOTHING(i = caseSensitiveFactory.createUnwrapped( "testUnrappedEntryCaseSensitive")); delete i; diff --git a/Framework/Kernel/test/FileDescriptorTest.h b/Framework/Kernel/test/FileDescriptorTest.h index 374b516a408e2c60516df9f7e04eb1721a9cc949..962912e735f4fbb84d8c0839379baed1a32cee56 100644 --- a/Framework/Kernel/test/FileDescriptorTest.h +++ b/Framework/Kernel/test/FileDescriptorTest.h @@ -140,7 +140,8 @@ public: //===================== Failure cases //============================================ void test_IsAscii_Throws_For_Inaccessible_Filename() { - TS_ASSERT_THROWS(FileDescriptor::isAscii(""), const std::invalid_argument &); + TS_ASSERT_THROWS(FileDescriptor::isAscii(""), + const std::invalid_argument &); TS_ASSERT_THROWS(FileDescriptor::isAscii("__not_a_File.txt__"), const std::invalid_argument &); } diff --git a/Framework/Kernel/test/ListValidatorTest.h b/Framework/Kernel/test/ListValidatorTest.h index f1da70bf90f0ac2e57db5ffca9e26dc860b2a258..133bbe68ab320a26fd70da8235ed38fa7bcb1746 100644 --- a/Framework/Kernel/test/ListValidatorTest.h +++ b/Framework/Kernel/test/ListValidatorTest.h @@ -99,7 +99,8 @@ public: TS_ASSERT_EQUALS(validator.getValueForAlias("2"), "two") TS_ASSERT_EQUALS(validator.getValueForAlias("3"), "three") - TS_ASSERT_THROWS(validator.getValueForAlias("4"), const std::invalid_argument &) + TS_ASSERT_THROWS(validator.getValueForAlias("4"), + const std::invalid_argument &) } void testAliasInt() { @@ -121,7 +122,8 @@ public: TS_ASSERT_EQUALS(validator.getValueForAlias("33"), "3") TS_ASSERT_EQUALS(validator.getValueForAlias("55"), "5") - TS_ASSERT_THROWS(validator.getValueForAlias("13"), const std::invalid_argument &) + TS_ASSERT_THROWS(validator.getValueForAlias("13"), + const std::invalid_argument &) } void test_wrong_alias() { diff --git a/Framework/Kernel/test/MagneticIonTest.h b/Framework/Kernel/test/MagneticIonTest.h index 9f00b27b608f126e271da17a7c36c62398812d3d..6ef6f9a45ca759c3c49fcd771e680df743ccf73b 100644 --- a/Framework/Kernel/test/MagneticIonTest.h +++ b/Framework/Kernel/test/MagneticIonTest.h @@ -40,12 +40,15 @@ public: } void testErrors() { - TS_ASSERT_THROWS(getMagneticIon("O", 2), const std::runtime_error &); // no such ion + TS_ASSERT_THROWS(getMagneticIon("O", 2), + const std::runtime_error &); // no such ion TS_ASSERT_THROWS(getMagneticIon("Am", 12), const std::runtime_error &); // no such charge - TS_ASSERT_THROWS(getJL("Am", 12), - const std::runtime_error &); // no such charge - pass to getJL - TS_ASSERT_THROWS(getJL("Am", 7, 3), const std::runtime_error &); // no such l + TS_ASSERT_THROWS( + getJL("Am", 12), + const std::runtime_error &); // no such charge - pass to getJL + TS_ASSERT_THROWS(getJL("Am", 7, 3), + const std::runtime_error &); // no such l } void test_Copied_Object_Has_Same_Attributes() { diff --git a/Framework/Kernel/test/MaterialBuilderTest.h b/Framework/Kernel/test/MaterialBuilderTest.h index ffc1ca54aa73b3b3a0855db069cbce6dcce55e0f..a4f35b738e84988eb0bf080ad2792583a74dde8c 100644 --- a/Framework/Kernel/test/MaterialBuilderTest.h +++ b/Framework/Kernel/test/MaterialBuilderTest.h @@ -170,7 +170,8 @@ public: void test_Setting_Neither_ChemicalFormula_And_AtomicNumber_Throws_Error() { MaterialBuilder builder; - TS_ASSERT_THROWS(builder.setName("Nickel").build(), const std::runtime_error &); + TS_ASSERT_THROWS(builder.setName("Nickel").build(), + const std::runtime_error &); } void test_Setting_Both_ChemicalFormula_And_AtomicNumber_Throws_Error() { diff --git a/Framework/Kernel/test/MatrixTest.h b/Framework/Kernel/test/MatrixTest.h index 730b6dd0a72670ca7d87b9f0648ade8a9a02e425..4607e1316e31e73402ce91c45968b824c56ab13d 100644 --- a/Framework/Kernel/test/MatrixTest.h +++ b/Framework/Kernel/test/MatrixTest.h @@ -479,8 +479,9 @@ public: DblMatrix M43 = boost::lexical_cast<DblMatrix>( "Matrix(4,3)-0.23,0.55,5.22,2.96,4.2,0.1,-0.23,0.55,5.22,2.96,4.2,0.1"); - TS_ASSERT_THROWS(M43.operator*(v), - const Mantid::Kernel::Exception::MisMatch<size_t> &); // V3D only + TS_ASSERT_THROWS( + M43.operator*(v), + const Mantid::Kernel::Exception::MisMatch<size_t> &); // V3D only } /// Test that the constructor taking preset sizes returns a zero matrix diff --git a/Framework/Kernel/test/OptionalBoolTest.h b/Framework/Kernel/test/OptionalBoolTest.h index ec3cfbe417ba4e5d53baaf74dcd8dcd60df933e8..0712a2feefd6e461381322323217c3733b8b28a9 100644 --- a/Framework/Kernel/test/OptionalBoolTest.h +++ b/Framework/Kernel/test/OptionalBoolTest.h @@ -131,8 +131,8 @@ public: } void testEncodeOptionalBoolPropertyThrows() { - using Mantid::Kernel::OptionalBool; using Mantid::Kernel::Exception::NotImplementedError; + using Mantid::Kernel::OptionalBool; OptionalBool truth{OptionalBool::True}; TS_ASSERT_THROWS(encodeAsJson(truth), const NotImplementedError &); } diff --git a/Framework/Kernel/test/PropertyManagerPropertyTest.h b/Framework/Kernel/test/PropertyManagerPropertyTest.h index 077824725f05d610a8c10697d8c1f2757c2630dd..d6f6f491dadeac75270a82edc4f4b301494928f9 100644 --- a/Framework/Kernel/test/PropertyManagerPropertyTest.h +++ b/Framework/Kernel/test/PropertyManagerPropertyTest.h @@ -241,7 +241,8 @@ public: // Failure tests //---------------------------------------------------------------------------- void test_Empty_Name_Is_Not_Accepted() { - TS_ASSERT_THROWS(PropertyManagerProperty(""), const std::invalid_argument &); + TS_ASSERT_THROWS(PropertyManagerProperty(""), + const std::invalid_argument &); } void test_String_Not_Holding_Valid_Json_or_Global_PM_Name_Returns_Error() { diff --git a/Framework/Kernel/test/ThreadPoolRunnableTest.h b/Framework/Kernel/test/ThreadPoolRunnableTest.h index 6fb7f89821a5506e4cffe9e9b40200f730fed620..39549c30e4f17fe9181459596f4ce5a2e531fcf7 100644 --- a/Framework/Kernel/test/ThreadPoolRunnableTest.h +++ b/Framework/Kernel/test/ThreadPoolRunnableTest.h @@ -21,7 +21,8 @@ int ThreadPoolRunnableTest_value; class ThreadPoolRunnableTest : public CxxTest::TestSuite { public: void test_constructor() { - TS_ASSERT_THROWS(new ThreadPoolRunnable(0, nullptr), const std::invalid_argument &); + TS_ASSERT_THROWS(new ThreadPoolRunnable(0, nullptr), + const std::invalid_argument &); } //======================================================================================= diff --git a/Framework/Kernel/test/TimeSeriesPropertyTest.h b/Framework/Kernel/test/TimeSeriesPropertyTest.h index a3021375450829fb91e05b36785920db50529a0e..d85fcadb49a420ec2bdf27e4626b1dc7e41b8dda 100644 --- a/Framework/Kernel/test/TimeSeriesPropertyTest.h +++ b/Framework/Kernel/test/TimeSeriesPropertyTest.h @@ -83,9 +83,12 @@ public: } void test_SetValueFromString() { - TS_ASSERT_THROWS(iProp->setValue("1"), const Exception::NotImplementedError &); - TS_ASSERT_THROWS(dProp->setValue("5.5"), const Exception::NotImplementedError &); - TS_ASSERT_THROWS(sProp->setValue("aValue"), const Exception::NotImplementedError &); + TS_ASSERT_THROWS(iProp->setValue("1"), + const Exception::NotImplementedError &); + TS_ASSERT_THROWS(dProp->setValue("5.5"), + const Exception::NotImplementedError &); + TS_ASSERT_THROWS(sProp->setValue("aValue"), + const Exception::NotImplementedError &); } void test_SetValueFromJson() { diff --git a/Framework/MDAlgorithms/test/CachedExperimentInfoTest.h b/Framework/MDAlgorithms/test/CachedExperimentInfoTest.h index a01529ce9b07ac8a675212c1f38534d8e6aafa6f..e30161a577157c885ae13b86bc3999ae055f1806 100644 --- a/Framework/MDAlgorithms/test/CachedExperimentInfoTest.h +++ b/Framework/MDAlgorithms/test/CachedExperimentInfoTest.h @@ -50,7 +50,8 @@ public: void test_trying_to_construct_object_with_unknown_id_throws_exception() { // createEmptyExptInfo(); auto expt = boost::make_shared<Mantid::API::ExperimentInfo>(); - TS_ASSERT_THROWS(CachedExperimentInfo(*expt, 1000), const std::out_of_range &); + TS_ASSERT_THROWS(CachedExperimentInfo(*expt, 1000), + const std::out_of_range &); } void test_trying_to_construct_object_with_no_chopper_throws() { diff --git a/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h b/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h index 6cfd159b633863cce2e33264f5c967de638a26ec..bbdd6845bbd506c62fd865d2cdbe4871ec976d32 100644 --- a/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h +++ b/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h @@ -58,7 +58,8 @@ public: CompositeImplicitFunctionParser functionParser; TSM_ASSERT_THROWS( "There is no successor parser setup for the PlaneFunctionParser", - functionParser.createFunctionBuilder(pRootElem), const std::runtime_error &); + functionParser.createFunctionBuilder(pRootElem), + const std::runtime_error &); } void disabled_testCallsFunctionParserChain() { diff --git a/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h b/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h index 40b9a26b6a059ed0482c1b668068da3abde9f995..54b7db147e459601b2f11f526817f8c7ee2244ff 100644 --- a/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h @@ -130,7 +130,8 @@ public: MDFileObject fileObject("test_file_for_load_md_histo_workspace_test_.txt", 2 * 2); IAlgorithm_sptr alg = make_standard_algorithm(fileObject); - TS_ASSERT_THROWS(alg->setProperty("Filename", ""), const std::invalid_argument &); + TS_ASSERT_THROWS(alg->setProperty("Filename", ""), + const std::invalid_argument &); } void test_throws_with_non_existant_filename() { diff --git a/Framework/MDAlgorithms/test/IntegrateFluxTest.h b/Framework/MDAlgorithms/test/IntegrateFluxTest.h index 9e19580a86d27f637bfa83fc947918a3b562f140..20594a6c0a44c52a5164b3991f173fbd7e114b19 100644 --- a/Framework/MDAlgorithms/test/IntegrateFluxTest.h +++ b/Framework/MDAlgorithms/test/IntegrateFluxTest.h @@ -239,7 +239,8 @@ private: alg.initialize(); alg.setPropertyValue("InputWorkspace", inWSName); alg.setPropertyValue("OutputWorkspace", outWSName); - TS_ASSERT_THROWS(alg.setProperty("NPoints", 1), const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("NPoints", 1), + const std::invalid_argument &); // Remove workspace from the data service. AnalysisDataService::Instance().clear(); diff --git a/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h index 573d7fff5f64318befaff13297bb21c4b15c0adb..8874121b619cf4d92dd66614db302548f6725bbb 100644 --- a/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h +++ b/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h @@ -148,7 +148,8 @@ public: const std::runtime_error &); TS_ASSERT_THROWS(s.setPropertyValue("Transaction", "anything"), const std::runtime_error &); - TS_ASSERT_THROWS(s.setPropertyValue("ID", "anything"), const std::runtime_error &); + TS_ASSERT_THROWS(s.setPropertyValue("ID", "anything"), + const std::runtime_error &); TS_ASSERT_THROWS(s.setPropertyValue("ScriptName", ""), const std::invalid_argument &); TS_ASSERT_THROWS(s.setPropertyValue("Scrip", "any name"), diff --git a/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h b/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h index 841537b11fc4add01c23dff5e35ce7510df3385c..3f570be6ab31cc1087c12fa3e9485a77ca801ab0 100644 --- a/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h +++ b/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h @@ -148,7 +148,8 @@ public: const std::runtime_error &); TS_ASSERT_THROWS(s.setPropertyValue("Transaction", "anything"), const std::runtime_error &); - TS_ASSERT_THROWS(s.setPropertyValue("ID", "anything"), const std::runtime_error &); + TS_ASSERT_THROWS(s.setPropertyValue("ID", "anything"), + const std::runtime_error &); TS_ASSERT_THROWS(s.setPropertyValue("ScriptName", ""), const std::invalid_argument &); TS_ASSERT_THROWS(s.setPropertyValue("Scrip", "any name"), diff --git a/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h b/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h index 2e6ccae27fc6d9a3ba06aa6d50f59a2a942e6e33..4fa25ad584183954a20289f86b87a57f5460552f 100644 --- a/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h +++ b/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h @@ -228,7 +228,8 @@ public: TSM_ASSERT_THROWS("abort job without job ID should throw", jm.abortRemoteJob(""), const JSONParseException &); TSM_ASSERT_THROWS("abort job with wrong job ID should throw", - jm.abortRemoteJob("anything_wrong"), const JSONParseException &); + jm.abortRemoteJob("anything_wrong"), + const JSONParseException &); TSM_ASSERT_THROWS("download with wrong transaction ID should throw", jm.downloadRemoteFile("any_wrong_transID", "remote_fname", @@ -240,7 +241,8 @@ public: // in the server response. std::vector<IRemoteJobManager::RemoteJobInfo> infos; TSM_ASSERT_THROWS("query all jobs without logging in should throw", - infos = jm.queryAllRemoteJobs(), const std::runtime_error &); + infos = jm.queryAllRemoteJobs(), + const std::runtime_error &); TSM_ASSERT_EQUALS( "there should not be any job information returned from the remote", infos.size(), 0); @@ -248,7 +250,8 @@ public: std::vector<std::string> files; TSM_ASSERT_THROWS( "query remote files with wrong transaction ID should throw", - files = jm.queryRemoteFile("any_wrong_transID"), const JSONParseException &); + files = jm.queryRemoteFile("any_wrong_transID"), + const JSONParseException &); TSM_ASSERT_EQUALS("The file list for a wrong transaction should be empty", files.size(), 0); @@ -259,7 +262,8 @@ public: std::string id; TSM_ASSERT_THROWS("start transaction without logging in should throw", - id = jm.startRemoteTransaction(), const JSONParseException &); + id = jm.startRemoteTransaction(), + const JSONParseException &); TSM_ASSERT_EQUALS("failed start transaction should not return any ID", id, ""); @@ -305,24 +309,28 @@ private: std::vector<IRemoteJobManager::RemoteJobInfo> infos; TSM_ASSERT_THROWS("query all jobs with ok response code but no content " "from server should throw", - infos = jm.queryAllRemoteJobs(), const std::runtime_error &); + infos = jm.queryAllRemoteJobs(), + const std::runtime_error &); std::vector<std::string> files; TSM_ASSERT_THROWS("query remote files with ok response code but no content " "from server should throw", - files = jm.queryRemoteFile("any"), const JSONParseException &); + files = jm.queryRemoteFile("any"), + const JSONParseException &); TSM_ASSERT_EQUALS("The file list for a transaction should be empty", files.size(), 0); IRemoteJobManager::RemoteJobInfo info; TSM_ASSERT_THROWS("query job info with ok response code from but no " "content from server should throw", - info = jm.queryRemoteJob("any"), const JSONParseException &); + info = jm.queryRemoteJob("any"), + const JSONParseException &); std::string id; TSM_ASSERT_THROWS("start transaction with ok response code but no content " "from server should throw", - id = jm.startRemoteTransaction(), const JSONParseException &); + id = jm.startRemoteTransaction(), + const JSONParseException &); TSM_ASSERT_EQUALS("failed start transaction should not return any ID", id, ""); @@ -388,7 +396,8 @@ private: TSM_ASSERT_THROWS( "stop transaction with error response from server should throw", - jm.stopRemoteTransaction("a_wrong_transID"), const JSONParseException &); + jm.stopRemoteTransaction("a_wrong_transID"), + const JSONParseException &); std::string jobID; TSM_ASSERT_THROWS("submit job with error response from server should throw", @@ -409,7 +418,8 @@ private: void checkJMErrWithoutErrMessage(MantidWebServiceAPIJobManager &jm) { TSM_ASSERT_THROWS("abort job with error response code but no content from " "server should throw", - jm.abortRemoteJob("anything"), const JSONParseException &); + jm.abortRemoteJob("anything"), + const JSONParseException &); TSM_ASSERT_THROWS( "authenticate with error response code but no content from server but " @@ -425,24 +435,28 @@ private: std::vector<IRemoteJobManager::RemoteJobInfo> infos; TSM_ASSERT_THROWS("query all jobs with error response from but no content " "server should throw", - infos = jm.queryAllRemoteJobs(), const std::runtime_error &); + infos = jm.queryAllRemoteJobs(), + const std::runtime_error &); std::vector<std::string> files; TSM_ASSERT_THROWS("query remote files with error response code but no " "content from server should throw", - files = jm.queryRemoteFile("any"), const JSONParseException &); + files = jm.queryRemoteFile("any"), + const JSONParseException &); TSM_ASSERT_EQUALS("The file list for a wrong transaction should be empty", files.size(), 0); IRemoteJobManager::RemoteJobInfo info; TSM_ASSERT_THROWS("query job info with error response but no content from " "server should throw", - info = jm.queryRemoteJob("any"), const JSONParseException &); + info = jm.queryRemoteJob("any"), + const JSONParseException &); std::string id; TSM_ASSERT_THROWS("start transaction with error response but no content " "from server should throw", - id = jm.startRemoteTransaction(), const JSONParseException &); + id = jm.startRemoteTransaction(), + const JSONParseException &); TSM_ASSERT_EQUALS("failed start transaction should not return any ID", id, ""); diff --git a/Framework/SINQ/test/PoldiDetectorDecoratorTest.h b/Framework/SINQ/test/PoldiDetectorDecoratorTest.h index 96f3c6bf692691ae503f94175fed2fbe72e44b9c..c1cecc58094efca1b0a10f3fd90a221a2c2079f1 100644 --- a/Framework/SINQ/test/PoldiDetectorDecoratorTest.h +++ b/Framework/SINQ/test/PoldiDetectorDecoratorTest.h @@ -71,7 +71,8 @@ public: PoldiDetectorDecorator decorator; TS_ASSERT_THROWS(decorator.twoTheta(0), const std::runtime_error &); - TS_ASSERT_THROWS(decorator.distanceFromSample(0), const std::runtime_error &); + TS_ASSERT_THROWS(decorator.distanceFromSample(0), + const std::runtime_error &); TS_ASSERT_THROWS(decorator.elementCount(), const std::runtime_error &); TS_ASSERT_THROWS(decorator.centralElement(), const std::runtime_error &); TS_ASSERT_THROWS(decorator.availableElements(), const std::runtime_error &); diff --git a/Framework/SINQ/test/PoldiFitPeaks2DTest.h b/Framework/SINQ/test/PoldiFitPeaks2DTest.h index deed493624e89c8347e93ecbb842802f6e135457..96c3de88a888ce0709757e383e164b10275f77bd 100644 --- a/Framework/SINQ/test/PoldiFitPeaks2DTest.h +++ b/Framework/SINQ/test/PoldiFitPeaks2DTest.h @@ -63,8 +63,10 @@ public: TS_ASSERT_THROWS_NOTHING(spectrumCalculator.setDeltaT(2.0)); TS_ASSERT_EQUALS(spectrumCalculator.m_deltaT, 2.0); - TS_ASSERT_THROWS(spectrumCalculator.setDeltaT(0.0), const std::invalid_argument &); - TS_ASSERT_THROWS(spectrumCalculator.setDeltaT(-1.0), const std::invalid_argument &); + TS_ASSERT_THROWS(spectrumCalculator.setDeltaT(0.0), + const std::invalid_argument &); + TS_ASSERT_THROWS(spectrumCalculator.setDeltaT(-1.0), + const std::invalid_argument &); } void testSetDeltaTFromWorkspace() { diff --git a/Framework/SINQ/test/PoldiPeakSearchTest.h b/Framework/SINQ/test/PoldiPeakSearchTest.h index bc3f289c532bdffe55b9a750b8ac110cad479e0f..becb7b21893f585d611aff5495fc805e25d23d27 100644 --- a/Framework/SINQ/test/PoldiPeakSearchTest.h +++ b/Framework/SINQ/test/PoldiPeakSearchTest.h @@ -53,7 +53,8 @@ public: void testSetMinimumDistance() { TestablePoldiPeakSearch poldiPeakSearch; - TS_ASSERT_THROWS(poldiPeakSearch.setMinimumDistance(0), const std::runtime_error &); + TS_ASSERT_THROWS(poldiPeakSearch.setMinimumDistance(0), + const std::runtime_error &); poldiPeakSearch.setMinimumDistance(2); TS_ASSERT_EQUALS(poldiPeakSearch.m_minimumDistance, 2); diff --git a/Framework/SINQ/test/PoldiTruncateDataTest.h b/Framework/SINQ/test/PoldiTruncateDataTest.h index 881d3998313863747bdc6f7f164b398d632e3651..0d77fd19351c9bf5573521b899a71039b58eaba6 100644 --- a/Framework/SINQ/test/PoldiTruncateDataTest.h +++ b/Framework/SINQ/test/PoldiTruncateDataTest.h @@ -103,16 +103,20 @@ public: EXPECT_CALL(*chopper, cycleTime()).Times(1).WillRepeatedly(Return(1500.0)); TestablePoldiTruncateData truncate; - TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), const std::invalid_argument &); + TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), + const std::invalid_argument &); truncate.setChopper(chopper); - TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), const std::invalid_argument &); + TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), + const std::invalid_argument &); truncate.setTimeBinWidth(-10.0); - TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), const std::invalid_argument &); + TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), + const std::invalid_argument &); truncate.setTimeBinWidth(0.0); - TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), const std::invalid_argument &); + TS_ASSERT_THROWS(truncate.getCalculatedBinCount(), + const std::invalid_argument &); truncate.setTimeBinWidth(3.0); diff --git a/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h b/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h index 75d565f6d8e7dd569949e07eb03ed480e89ab0b6..adbdce8d0babc0c23308df94433ac3877520e7f0 100644 --- a/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h +++ b/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h @@ -46,7 +46,8 @@ public: // Arrange CompositePeaksPresenterVsi presenter; // Assert - TS_ASSERT_THROWS(presenter.getPeaksWorkspaceName(), const std::runtime_error &); + TS_ASSERT_THROWS(presenter.getPeaksWorkspaceName(), + const std::runtime_error &); } void testThatGetListOfNamesOfSubPresenters() { diff --git a/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h index f893d107285850c25c4040d3c60e14fa1a22302b..f40e4189afec51cc6d657344184f9a673907a044 100644 --- a/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h @@ -123,7 +123,8 @@ public: EventNexusLoadingPresenter presenter( Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile()); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.getTimeStepValues(), const std::runtime_error &); + presenter.getTimeStepValues(), + const std::runtime_error &); } void testCallGetGeometryThrows() { diff --git a/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h b/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h index f3d6b0e00f2456a4cfc29487030a53a41ae0c4f4..6056718fc106a990874f52cb0f3c57ff8d3f3351 100644 --- a/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h +++ b/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h @@ -69,14 +69,16 @@ public: FieldDataToMetadata function; TSM_ASSERT_THROWS("Unknown id requested. Should have thrown.", - function.execute(fieldData, "x"), const std::runtime_error &); + function.execute(fieldData, "x"), + const std::runtime_error &); } void testThrowsIfNullFieldData() { vtkFieldData *nullFieldData = nullptr; FieldDataToMetadata function; TSM_ASSERT_THROWS("Should not be able to execute with null field data.", - function.execute(nullFieldData, "x"), const std::runtime_error &); + function.execute(nullFieldData, "x"), + const std::runtime_error &); } }; diff --git a/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h index 249a430fedaf0a6c041962dc01f98765be26f504..8c07679621ca076c88e820887baf3de058bb1105 100644 --- a/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h @@ -125,14 +125,16 @@ public: MDEWEventNexusLoadingPresenter presenter( Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile()); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.hasTDimensionAvailable(), const std::runtime_error &); + presenter.hasTDimensionAvailable(), + const std::runtime_error &); } void testCallGetTDimensionValuesThrows() { MDEWEventNexusLoadingPresenter presenter( Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile()); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.getTimeStepValues(), const std::runtime_error &); + presenter.getTimeStepValues(), + const std::runtime_error &); } void testCallGetGeometryThrows() { diff --git a/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h index 91e52de80c9944224f057056257c5c23092f025e..c2c1ea197e65fcbae4fa3b044937562977e32f2f 100644 --- a/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h @@ -224,7 +224,8 @@ public: Mantid::Kernel::make_unique<MockMDLoadingView>(), new MockWorkspaceProvider, "_"); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.hasTDimensionAvailable(), const std::runtime_error &); + presenter.hasTDimensionAvailable(), + const std::runtime_error &); } void testCallGetTDimensionValuesThrows() { @@ -232,7 +233,8 @@ public: Mantid::Kernel::make_unique<MockMDLoadingView>(), new MockWorkspaceProvider, "_"); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.getTimeStepValues(), const std::runtime_error &); + presenter.getTimeStepValues(), + const std::runtime_error &); } void testCallGetGeometryThrows() { diff --git a/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h index 11b741abe77a0c1213bf11164a1e39e65e2edcc9..3cb7fbeaceae5d9c9e9e7a591fa3f9dc1515d02a 100644 --- a/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h @@ -220,7 +220,8 @@ public: Mantid::Kernel::make_unique<MockMDLoadingView>(), new MockWorkspaceProvider, "_"); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.hasTDimensionAvailable(), const std::runtime_error &); + presenter.hasTDimensionAvailable(), + const std::runtime_error &); } void testCallGetTDimensionValuesThrows() { @@ -228,7 +229,8 @@ public: Mantid::Kernel::make_unique<MockMDLoadingView>(), new MockWorkspaceProvider, "_"); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.getTimeStepValues(), const std::runtime_error &); + presenter.getTimeStepValues(), + const std::runtime_error &); } void testCallGetGeometryThrows() { diff --git a/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h index 0f8a87ba8feb434623648797b7824234be0d3553..ffb9bb09cbd4bd502dddc7c28e6042cf6e490244 100644 --- a/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h @@ -253,14 +253,16 @@ public: MDHWNexusLoadingPresenter presenter( Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile()); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.hasTDimensionAvailable(), const std::runtime_error &); + presenter.hasTDimensionAvailable(), + const std::runtime_error &); } void testCallGetTDimensionValuesThrows() { MDHWNexusLoadingPresenter presenter( Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFile()); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.getTimeStepValues(), const std::runtime_error &); + presenter.getTimeStepValues(), + const std::runtime_error &); } void testCallGetGeometryThrows() { diff --git a/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h b/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h index 040d0e3b769ea26717b81fd4e06d6f53341e672f..271e2c818b4365e1b27c057ff5535e529c21e7d6 100644 --- a/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h +++ b/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h @@ -21,7 +21,8 @@ public: void testGettingPeaksWorkspaceThrows() { NullPeaksPresenterVsi presenter; TSM_ASSERT_THROWS("Should not implement this method", - presenter.getPeaksWorkspace(), const std::runtime_error &); + presenter.getPeaksWorkspace(), + const std::runtime_error &); } void testGettingUsablePeaksThrows() { diff --git a/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h index b7624d840e11419731a10987374f219909cef9d5..99877d887177f9f37016284b9ec0f4fccc0e2f83 100644 --- a/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h @@ -156,7 +156,8 @@ public: Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFileNamePath()); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.hasTDimensionAvailable(), const std::runtime_error &); + presenter.hasTDimensionAvailable(), + const std::runtime_error &); } void testCallGetTDimensionValuesThrows() { @@ -164,7 +165,8 @@ public: Mantid::Kernel::make_unique<MockMDLoadingView>(), getSuitableFileNamePath()); TSM_ASSERT_THROWS("Should throw. Execute not yet run.", - presenter.getTimeStepValues(), const std::runtime_error &); + presenter.getTimeStepValues(), + const std::runtime_error &); } void testCallGetGeometryThrows() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h index 91cfa87eef449150b4655b7b9f36165a1dca9391..8a531f7a5ce79d01554c2ce166d0bbf1984f4efb 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h @@ -221,7 +221,8 @@ public: auto out = vtkSmartPointer<vtkUnstructuredGrid>::New(); vtkDataSetToPeaksFilteredDataSet peaksFilter(in, out); FakeProgressAction updateProgress; - TS_ASSERT_THROWS(peaksFilter.execute(updateProgress), const std::runtime_error &); + TS_ASSERT_THROWS(peaksFilter.execute(updateProgress), + const std::runtime_error &); } void testExecutionWithSingleSphericalPeakInQSample() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h index e38c255252efd2791f9a60fcab1dd41bd201718e..39761d12d2818668c6aeb37fa35e4e445142fa6b 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h @@ -34,7 +34,8 @@ private: public: void testThrowIfvtkDataSetNull() { vtkDataSet *nullArg = nullptr; - TS_ASSERT_THROWS(vtkDataSetToWsLocation temp(nullArg), const std::runtime_error &); + TS_ASSERT_THROWS(vtkDataSetToWsLocation temp(nullArg), + const std::runtime_error &); } void testExecution() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h index 7e12fe871f6cdbaba50c49095f8f3ecd3e1eb5a1..a2e071798a5c66c957bfa35fb34f8d96f2f64f4d 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h @@ -33,7 +33,8 @@ private: public: void testThrowIfvtkDataSetNull() { vtkDataSet *nullArg = nullptr; - TS_ASSERT_THROWS(vtkDataSetToWsName temp(nullArg), const std::runtime_error &); + TS_ASSERT_THROWS(vtkDataSetToWsName temp(nullArg), + const std::runtime_error &); } void testExecution() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h index acdea625b3e0604e097f779f6950a5640a6e9c17..429d0f226d87aad0f06b8d72b3c7259f747d43d6 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h @@ -58,7 +58,8 @@ private: vtkMDHexFactory factory(VATES::VolumeNormalization); factory.setCheckDimensionality(doCheckDimensionality); if (doCheckDimensionality) { - TS_ASSERT_THROWS(factory.initialize(binned_ws), const std::runtime_error &); + TS_ASSERT_THROWS(factory.initialize(binned_ws), + const std::runtime_error &); } else { TS_ASSERT_THROWS_NOTHING(factory.initialize(binned_ws)); vtkSmartPointer<vtkDataSet> product; @@ -73,7 +74,8 @@ public: FakeProgressAction progressUpdater; vtkMDHexFactory factory(VATES::VolumeNormalization); TSM_ASSERT_THROWS("Have NOT initalized object. Should throw.", - factory.create(progressUpdater), const std::runtime_error &); + factory.create(progressUpdater), + const std::runtime_error &); } void testInitalizeWithNullWorkspaceThrows() { @@ -144,7 +146,8 @@ public: FakeProgressAction progressUpdater; vtkMDHexFactory factory(VATES::VolumeNormalization); // initialize not called! - TS_ASSERT_THROWS(factory.create(progressUpdater), const std::runtime_error &); + TS_ASSERT_THROWS(factory.create(progressUpdater), + const std::runtime_error &); } void test_roundUp_positive_numbers() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h index c3f4546dd1a76507e8d305e3a978282f35e5f0b3..e6a2d523a014877f0ce10b0017b74acf7a959488 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h @@ -96,7 +96,8 @@ public: vtkMDHistoHex4DFactory<TimeStepToTimeStep> factory( Mantid::VATES::VolumeNormalization, 1); - TS_ASSERT_THROWS(factory.create(progressAction), const std::runtime_error &); + TS_ASSERT_THROWS(factory.create(progressAction), + const std::runtime_error &); } void testInitializationDelegates() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h index 1224ac1d6818307c5f2285581a8ce2bd883bbf6b..e669f6a3e860afeb7d242c95088bc553e73b11e1 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h @@ -91,7 +91,8 @@ public: void testCreateWithoutInitializeThrows() { FakeProgressAction progressUpdate; vtkMDHistoHexFactory factory(Mantid::VATES::VolumeNormalization); - TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &); + TS_ASSERT_THROWS(factory.create(progressUpdate), + const std::runtime_error &); } void testInitializationDelegates() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h index 8a2a2ce20c919c9e396bc2b1b92b1301280c9937..3d5f3358471464eaf4c8a43adc83b4bb63e468e2 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h @@ -45,7 +45,8 @@ public: void testCreateWithoutInitializeThrows() { FakeProgressAction progressUpdate; vtkMDHistoLineFactory factory(Mantid::VATES::VolumeNormalization); - TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &); + TS_ASSERT_THROWS(factory.create(progressUpdate), + const std::runtime_error &); } void testProgressUpdates() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h index a687cf9b8d7bc1235a90eff13bcd929be93abc6e..593f34ee4ea900f2a8663a70a19bf096a53eddd6 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h @@ -50,7 +50,8 @@ public: FakeProgressAction progressUpdate; vtkMDHistoQuadFactory factory(Mantid::VATES::VolumeNormalization); - TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &); + TS_ASSERT_THROWS(factory.create(progressUpdate), + const std::runtime_error &); } void testInsideThresholds() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h index caf10372884463d7c116b0c2f21a0eb28f571567..e5559fe5219b9d5cd15cd04efc732e23c2a3ea45 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h @@ -87,7 +87,8 @@ public: vtkMDLineFactory factory(Mantid::VATES::VolumeNormalization); // initialize not called! - TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &); + TS_ASSERT_THROWS(factory.create(progressUpdate), + const std::runtime_error &); } void testCreation() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h index a24c0154a3b71fdfb46be3b9b602650e3d59cff2..5ee8ee8a057c7837c2778a96c7e2a5b6999d771a 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h @@ -89,7 +89,8 @@ public: vtkMDQuadFactory factory(Mantid::VATES::VolumeNormalization); // initialize not called! - TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &); + TS_ASSERT_THROWS(factory.create(progressUpdate), + const std::runtime_error &); } void testCreation() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h index 26f4745cde46020a436f9baf2f9fb129a0568e56..2d6f4f40f8962e693c75e244dbdc5533ac15939c 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h @@ -168,7 +168,8 @@ public: void testCreateWithoutInitializeThrows() { FakeProgressAction progressUpdate; vtkPeakMarkerFactory factory("signal"); - TS_ASSERT_THROWS(factory.create(progressUpdate), const std::runtime_error &); + TS_ASSERT_THROWS(factory.create(progressUpdate), + const std::runtime_error &); } void testTypeName() { diff --git a/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h index 565545bbde30159a6e379bae89ee070fcdebe68b..c3aa661389e76ab34bbef3e105fa58695b178f8c 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h @@ -44,7 +44,8 @@ public: FakeProgressAction progressUpdate; vtkSplatterPlotFactory factory("signal"); TSM_ASSERT_THROWS("Have NOT initalized object. Should throw.", - factory.create(progressUpdate), const std::runtime_error &); + factory.create(progressUpdate), + const std::runtime_error &); } void testInitializeWithNullWorkspaceThrows() { diff --git a/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h b/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h index 076fc9bb822a49056949a78e25cb6b08aa67a6a9..cbd10b79384580e285ca77ae72344cc24e1fe949 100644 --- a/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h @@ -196,7 +196,8 @@ public: void test_that_setResolution_will_throw_when_provided_an_index_that_is_out_of_range() { - TS_ASSERT_THROWS(m_model->setResolution(m_workspace, 5), const std::out_of_range &); + TS_ASSERT_THROWS(m_model->setResolution(m_workspace, 5), + const std::out_of_range &); } private: diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h index b582b35be0c17b430010120cf674f01332395152..903c82336df7e727d7c0e8c136459d8a611f1bf0 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h @@ -270,9 +270,11 @@ public: "10", "100000000000000000000000000000", "1,5,10", "1,2,3,4,5,6,22"}; for (auto i = 0u; i < spectraPairs.size(); ++i) - TS_ASSERT_THROWS(data->setSpectra(spectraPairs[i]), const std::runtime_error &); + TS_ASSERT_THROWS(data->setSpectra(spectraPairs[i]), + const std::runtime_error &); for (auto i = 0u; i < spectraStrings.size(); ++i) - TS_ASSERT_THROWS(data->setSpectra(spectraStrings[i]), const std::runtime_error &); + TS_ASSERT_THROWS(data->setSpectra(spectraStrings[i]), + const std::runtime_error &); } void test_no_throw_when_setSpectra_is_provided_a_valid_spectra() { diff --git a/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h b/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h index 064a20d117c7fb4a4c0bbe1a6fb822fad981fd37..4083d9bd124fc612a733995a61262f079dd60297 100644 --- a/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h +++ b/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h @@ -132,7 +132,8 @@ public: void test_getDeadTimesTable_FromFile_NotPresent() { MuonAnalysisDataLoader loader(DeadTimesType::FromFile, {"MUSR"}); LoadResult result; - TS_ASSERT_THROWS(loader.getDeadTimesTable(result), const std::runtime_error &); + TS_ASSERT_THROWS(loader.getDeadTimesTable(result), + const std::runtime_error &); } void test_getDeadTimesTable_FromFile() { diff --git a/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h b/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h index b1401a65077c789672b4ff4760b314f4ded65a9c..6387a87bd4f3867366d50c1820ae99ea24f52cd8 100644 --- a/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h +++ b/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h @@ -34,9 +34,9 @@ using Mantid::API::TableRow; using Mantid::API::Workspace; using Mantid::API::WorkspaceFactory; using Mantid::API::WorkspaceGroup; +using MantidQt::CustomInterfaces::Muon::DeadTimesType; using MantidQt::CustomInterfaces::MuonAnalysisDataLoader; using MantidQt::CustomInterfaces::MuonAnalysisFitDataPresenter; -using MantidQt::CustomInterfaces::Muon::DeadTimesType; using MantidQt::MantidWidgets::IMuonFitDataModel; using MantidQt::MantidWidgets::IMuonFitDataSelector; using MantidQt::MantidWidgets::IWorkspaceFitControl; diff --git a/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h b/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h index 694dc84a8210a54b299d7b26c97a9550c9f2f537..2191516d672be54ac2d59117369f533db0547f53 100644 --- a/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h +++ b/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h @@ -36,7 +36,8 @@ public: void test_invalid_algorithms() { // Algorithm with a single input ws property - TS_ASSERT_THROWS(PreprocessingAlgorithm("Rebin"), const std::invalid_argument &); + TS_ASSERT_THROWS(PreprocessingAlgorithm("Rebin"), + const std::invalid_argument &); // Algorithm with more than two input ws properties TS_ASSERT_THROWS(PreprocessingAlgorithm("ReflectometryReductionOneAuto"), const std::invalid_argument &); diff --git a/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h b/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h index b0da705f2586de56930916bc71545dbe64fada8d..f038301583cfaf8ee52f83e5bfe28b45321373d8 100644 --- a/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h +++ b/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h @@ -729,7 +729,8 @@ public: auto rowValues = std::map<QString, QString>{{"Column1", "row_10"}, {"Column2", "row_11"}}; auto rowsToTransfer = std::vector<std::map<QString, QString>>{{rowValues}}; - TS_ASSERT_THROWS(model.transfer(rowsToTransfer), const std::invalid_argument &); + TS_ASSERT_THROWS(model.transfer(rowsToTransfer), + const std::invalid_argument &); } void testTransferToExistingGroup() { diff --git a/qt/widgets/common/test/ParseKeyValueStringTest.h b/qt/widgets/common/test/ParseKeyValueStringTest.h index 8c100c84011420901e9f1a39e535d338dcda9d21..ca29e450f286998d5cf80ab410dd4d618f6ea16d 100644 --- a/qt/widgets/common/test/ParseKeyValueStringTest.h +++ b/qt/widgets/common/test/ParseKeyValueStringTest.h @@ -33,7 +33,8 @@ public: TS_ASSERT_THROWS(parseKeyValueString("a = 1, b = 2, c = 3,d"), const std::runtime_error &); TS_ASSERT_THROWS(parseKeyValueString(",a = 1"), const std::runtime_error &); - TS_ASSERT_THROWS(parseKeyValueString(",a = 1 = 2,="), const std::runtime_error &); + TS_ASSERT_THROWS(parseKeyValueString(",a = 1 = 2,="), + const std::runtime_error &); TS_ASSERT_THROWS(parseKeyValueString("=,=,="), const std::runtime_error &); } @@ -53,8 +54,10 @@ public: const std::runtime_error &); TS_ASSERT_THROWS(parseKeyValueQString("a = 1, b = 2, c = 3,d"), const std::runtime_error &); - TS_ASSERT_THROWS(parseKeyValueQString(",a = 1"), const std::runtime_error &); - TS_ASSERT_THROWS(parseKeyValueQString(",a = 1 = 2,="), const std::runtime_error &); + TS_ASSERT_THROWS(parseKeyValueQString(",a = 1"), + const std::runtime_error &); + TS_ASSERT_THROWS(parseKeyValueQString(",a = 1 = 2,="), + const std::runtime_error &); TS_ASSERT_THROWS(parseKeyValueQString("=,=,="), const std::runtime_error &); } }; diff --git a/qt/widgets/mplcpp/test/AxesTest.h b/qt/widgets/mplcpp/test/AxesTest.h index ce1464861647c8929a08c2f9841b0dab446c257b..7ff9a40c1e0b07480f97140698db4e8fafa494d7 100644 --- a/qt/widgets/mplcpp/test/AxesTest.h +++ b/qt/widgets/mplcpp/test/AxesTest.h @@ -116,12 +116,14 @@ public: void testSetXScaleWithUnknownScaleTypeThrows() { Axes axes(pyAxes()); - TS_ASSERT_THROWS(axes.setXScale("notascaletype"), const std::invalid_argument &); + TS_ASSERT_THROWS(axes.setXScale("notascaletype"), + const std::invalid_argument &); } void testSetYScaleWithUnknownScaleTypeThrows() { Axes axes(pyAxes()); - TS_ASSERT_THROWS(axes.setYScale("notascaletype"), const std::invalid_argument &); + TS_ASSERT_THROWS(axes.setYScale("notascaletype"), + const std::invalid_argument &); } private: diff --git a/qt/widgets/mplcpp/test/ColormapTest.h b/qt/widgets/mplcpp/test/ColormapTest.h index da4d7a785e1726dc3d35b7fc58f0f57508fc8e83..82bfdb5ae8a3fa633ade10b751e5654523be68cb 100644 --- a/qt/widgets/mplcpp/test/ColormapTest.h +++ b/qt/widgets/mplcpp/test/ColormapTest.h @@ -13,8 +13,8 @@ #include <cxxtest/TestSuite.h> using Mantid::PythonInterface::PythonException; -using MantidQt::Widgets::MplCpp::cmapExists; using MantidQt::Widgets::MplCpp::Colormap; +using MantidQt::Widgets::MplCpp::cmapExists; using MantidQt::Widgets::MplCpp::getCMap; class ColormapTest : public CxxTest::TestSuite { diff --git a/qt/widgets/mplcpp/test/QBackendExtractTest.h b/qt/widgets/mplcpp/test/QBackendExtractTest.h index 08e657f5e7201860d61410c028f652ef89cdc6c4..3e2944a53887e8673c1bb782afbe96e39218be91 100644 --- a/qt/widgets/mplcpp/test/QBackendExtractTest.h +++ b/qt/widgets/mplcpp/test/QBackendExtractTest.h @@ -41,7 +41,8 @@ public: const Python::Object nonSipType{ Python::NewRef(Py_BuildValue("(ii)", 1, 2))}; struct Foo; - TS_ASSERT_THROWS(Python::extract<Foo>(nonSipType), const std::runtime_error &); + TS_ASSERT_THROWS(Python::extract<Foo>(nonSipType), + const std::runtime_error &); } };