diff --git a/Code/Mantid/Framework/Algorithms/test/AlignDetectorsTest.h b/Code/Mantid/Framework/Algorithms/test/AlignDetectorsTest.h index 2cb43926a6c79fcbe7052c0bff59414dfa52c0ea..b5d6b6b8ce62d62e57968195b32162dfe86e9f8a 100644 --- a/Code/Mantid/Framework/Algorithms/test/AlignDetectorsTest.h +++ b/Code/Mantid/Framework/Algorithms/test/AlignDetectorsTest.h @@ -18,10 +18,6 @@ using namespace Mantid::API; class AlignDetectorsTest : public CxxTest::TestSuite { public: - AlignDetectorsTest() - { - } - /** Setup for loading raw data */ void setUp_Raw() { diff --git a/Code/Mantid/Framework/Algorithms/test/CalculateTransmissionBeamSpreaderTest.h b/Code/Mantid/Framework/Algorithms/test/CalculateTransmissionBeamSpreaderTest.h index a06a4da5b7230ef7cdec5a28ae95633aae20fa12..254363edb93a02cb509b7291000b2d00394ea89a 100644 --- a/Code/Mantid/Framework/Algorithms/test/CalculateTransmissionBeamSpreaderTest.h +++ b/Code/Mantid/Framework/Algorithms/test/CalculateTransmissionBeamSpreaderTest.h @@ -17,8 +17,6 @@ using namespace Mantid::DataObjects; class CalculateTransmissionBeamSpreaderTest : public CxxTest::TestSuite { public: - CalculateTransmissionBeamSpreaderTest() : trans() {} - void testName() { TS_ASSERT_EQUALS( trans.name(), "CalculateTransmissionBeamSpreader" ) diff --git a/Code/Mantid/Framework/Algorithms/test/ChangeLogTimeTest.h b/Code/Mantid/Framework/Algorithms/test/ChangeLogTimeTest.h index c0edf5cfd22175bf5e8cc80875837c345fd569f8..5d551c7232fc9198d64a33182de8f2e00b1f507a 100644 --- a/Code/Mantid/Framework/Algorithms/test/ChangeLogTimeTest.h +++ b/Code/Mantid/Framework/Algorithms/test/ChangeLogTimeTest.h @@ -15,6 +15,11 @@ using namespace Mantid::Kernel; class ChangeLogTimeTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static ChangeLogTimeTest *createSuite() { return new ChangeLogTimeTest(); } + static void destroySuite( ChangeLogTimeTest *suite ) { delete suite; } + /// Set up the parameters for what the tests do. ChangeLogTimeTest() { diff --git a/Code/Mantid/Framework/Algorithms/test/ChopDataTest.h b/Code/Mantid/Framework/Algorithms/test/ChopDataTest.h index ec5079b8d4ba5876c0abc0c09bda4c979212095b..9749c2e40f8480955f5c7c9b0ebf4a4a3be033f0 100644 --- a/Code/Mantid/Framework/Algorithms/test/ChopDataTest.h +++ b/Code/Mantid/Framework/Algorithms/test/ChopDataTest.h @@ -11,10 +11,7 @@ using namespace Mantid::Algorithms; class ChopDataTest : public CxxTest::TestSuite { - public: - ChopDataTest() {} - ~ChopDataTest() {} void testMetaInfo() { @@ -103,4 +100,4 @@ private: }; -#endif \ No newline at end of file +#endif diff --git a/Code/Mantid/Framework/Algorithms/test/ConjoinWorkspacesTest.h b/Code/Mantid/Framework/Algorithms/test/ConjoinWorkspacesTest.h index df394a6336f5e224a032aafb8ed7e41d9b57fa4b..3b26a9dff2850ae824fc15f0d532a49a3786410f 100644 --- a/Code/Mantid/Framework/Algorithms/test/ConjoinWorkspacesTest.h +++ b/Code/Mantid/Framework/Algorithms/test/ConjoinWorkspacesTest.h @@ -16,6 +16,11 @@ using namespace Mantid::DataObjects; class ConjoinWorkspacesTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static ConjoinWorkspacesTest *createSuite() { return new ConjoinWorkspacesTest(); } + static void destroySuite( ConjoinWorkspacesTest *suite ) { delete suite; } + ConjoinWorkspacesTest() : ws1Name("ConjoinWorkspacesTest_grp1"), ws2Name("ConjoinWorkspacesTest_grp2") { diff --git a/Code/Mantid/Framework/Algorithms/test/ConvertUnitsTest.h b/Code/Mantid/Framework/Algorithms/test/ConvertUnitsTest.h index c08216294988045d2436434b79bfd260806e22e8..757bfa7a5d7803bf06f412685f29f0487e39217c 100644 --- a/Code/Mantid/Framework/Algorithms/test/ConvertUnitsTest.h +++ b/Code/Mantid/Framework/Algorithms/test/ConvertUnitsTest.h @@ -24,11 +24,6 @@ using namespace Mantid::DataObjects; class ConvertUnitsTest : public CxxTest::TestSuite { public: - - ConvertUnitsTest() - { - } - void setup_WS() { // Set up a small workspace for testing diff --git a/Code/Mantid/Framework/Algorithms/test/CorrectKiKfTest.h b/Code/Mantid/Framework/Algorithms/test/CorrectKiKfTest.h index 2562c41010b9a06f801e126cb577eb67993aaa7a..1293b5c1afc184f3be6a82167a5fd80f7aee0439 100644 --- a/Code/Mantid/Framework/Algorithms/test/CorrectKiKfTest.h +++ b/Code/Mantid/Framework/Algorithms/test/CorrectKiKfTest.h @@ -19,6 +19,10 @@ using namespace Mantid::DataObjects; class CorrectKiKfTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static CorrectKiKfTest *createSuite() { return new CorrectKiKfTest(); } + static void destroySuite( CorrectKiKfTest *suite ) { delete suite; } CorrectKiKfTest(): inputWSname("testInput"), inputEvWSname("testEvInput"), outputWSname("testOutput"), outputEvWSname("testEvOutput") { diff --git a/Code/Mantid/Framework/Algorithms/test/CorrectToFileTest.h b/Code/Mantid/Framework/Algorithms/test/CorrectToFileTest.h index 619b85d1a8a2c2860d04910998cf5b71be6c9242..84f2fd16ff8b7c4049623707ffad5e7326c2641c 100644 --- a/Code/Mantid/Framework/Algorithms/test/CorrectToFileTest.h +++ b/Code/Mantid/Framework/Algorithms/test/CorrectToFileTest.h @@ -18,6 +18,10 @@ using Mantid::API::MatrixWorkspace_sptr; class CorrectToFileTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static CorrectToFileTest *createSuite() { return new CorrectToFileTest(); } + static void destroySuite( CorrectToFileTest *suite ) { delete suite; } CorrectToFileTest() : inputFile("DIRECT.041") {} diff --git a/Code/Mantid/Framework/Algorithms/test/DetectorEfficiencyCorTest.h b/Code/Mantid/Framework/Algorithms/test/DetectorEfficiencyCorTest.h index bf7b40e6ffe74c9ed0416d519bb1ddd4aba518bf..022000ccd4a61dcbba5a214ca463d189dd9e0fcc 100644 --- a/Code/Mantid/Framework/Algorithms/test/DetectorEfficiencyCorTest.h +++ b/Code/Mantid/Framework/Algorithms/test/DetectorEfficiencyCorTest.h @@ -36,7 +36,12 @@ using Mantid::MantidVecPtr; class DetectorEfficiencyCorTest : public CxxTest::TestSuite { public: - DetectorEfficiencyCorTest() : + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static DetectorEfficiencyCorTest *createSuite() { return new DetectorEfficiencyCorTest(); } + static void destroySuite( DetectorEfficiencyCorTest *suite ) { delete suite; } + + DetectorEfficiencyCorTest() : m_InoutWS("DetectorEfficiencyCorTest_input_workspace"), m_OutWS("DetectorEfficiencyCorTest_output_workspace") { diff --git a/Code/Mantid/Framework/Algorithms/test/ExtractFFTSpectrumTest.h b/Code/Mantid/Framework/Algorithms/test/ExtractFFTSpectrumTest.h index ae6d23373b6ce7ada1ec2af5bc35675c71c421cd..89f7ea2ff11be1754a8a2396b503db0a192107db 100644 --- a/Code/Mantid/Framework/Algorithms/test/ExtractFFTSpectrumTest.h +++ b/Code/Mantid/Framework/Algorithms/test/ExtractFFTSpectrumTest.h @@ -17,9 +17,6 @@ class ExtractFFTSpectrumTest : public CxxTest::TestSuite { public: - ExtractFFTSpectrumTest() {} - ~ExtractFFTSpectrumTest() {} - void testMetaInfo() { alg = new ExtractFFTSpectrum(); diff --git a/Code/Mantid/Framework/Algorithms/test/FFTDerivativeTest.h b/Code/Mantid/Framework/Algorithms/test/FFTDerivativeTest.h index 4d6a2329b871136abb3bf5e4112dd348928b9da2..8cb90f5500a87e1fe90521bcc2fb61b15897e2cd 100644 --- a/Code/Mantid/Framework/Algorithms/test/FFTDerivativeTest.h +++ b/Code/Mantid/Framework/Algorithms/test/FFTDerivativeTest.h @@ -15,13 +15,6 @@ using namespace Mantid::API; class FFTDerivativeTest : public CxxTest::TestSuite { public: - FFTDerivativeTest() - { - } - ~FFTDerivativeTest() - { - } - void testGaussianDerivative() { const int N = 100; diff --git a/Code/Mantid/Framework/Algorithms/test/FFTTest.h b/Code/Mantid/Framework/Algorithms/test/FFTTest.h index aba5422c85d623d73d6bb27c570d569557938e4a..da720f1098885f35d5321be7b9993c555b34e96f 100644 --- a/Code/Mantid/Framework/Algorithms/test/FFTTest.h +++ b/Code/Mantid/Framework/Algorithms/test/FFTTest.h @@ -15,6 +15,11 @@ using namespace Mantid::API; class FFTTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static FFTTest *createSuite() { return new FFTTest(); } + static void destroySuite( FFTTest *suite ) { delete suite; } + FFTTest():dX(0.2),PI(3.1415926535897932384626433832795),h(sqrt(PI/3)),a(PI*PI/3) { } diff --git a/Code/Mantid/Framework/Algorithms/test/FilterBadPulsesTest.h b/Code/Mantid/Framework/Algorithms/test/FilterBadPulsesTest.h index 23a8e934dd322ea0de113e7471096d6d3729d830..d3c6b9f7ec12b7da4b3079e876addddb512ba075 100644 --- a/Code/Mantid/Framework/Algorithms/test/FilterBadPulsesTest.h +++ b/Code/Mantid/Framework/Algorithms/test/FilterBadPulsesTest.h @@ -14,6 +14,11 @@ using namespace Mantid::DataObjects; class FilterBadPulsesTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static FilterBadPulsesTest *createSuite() { return new FilterBadPulsesTest(); } + static void destroySuite( FilterBadPulsesTest *suite ) { delete suite; } + FilterBadPulsesTest(): inputWS("testInput"), outputWS("testOutput") { } diff --git a/Code/Mantid/Framework/Algorithms/test/FilterByLogValueTest.h b/Code/Mantid/Framework/Algorithms/test/FilterByLogValueTest.h index 19f26bf16c4a5e7616027884ef73672c55e19082..2e47f25742e86da5c92a9ea9e5c549f10824ceae 100644 --- a/Code/Mantid/Framework/Algorithms/test/FilterByLogValueTest.h +++ b/Code/Mantid/Framework/Algorithms/test/FilterByLogValueTest.h @@ -27,6 +27,11 @@ using namespace Mantid::API; class FilterByLogValueTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static FilterByLogValueTest *createSuite() { return new FilterByLogValueTest(); } + static void destroySuite( FilterByLogValueTest *suite ) { delete suite; } + FilterByLogValueTest() { inputWS = "eventWS"; diff --git a/Code/Mantid/Framework/Algorithms/test/FilterByTimeTest.h b/Code/Mantid/Framework/Algorithms/test/FilterByTimeTest.h index 5ac22f292588dccd043d8580a3278901b07cf813..c1af58dd17e0e94a14cf94304a6ea77a15aefaf9 100644 --- a/Code/Mantid/Framework/Algorithms/test/FilterByTimeTest.h +++ b/Code/Mantid/Framework/Algorithms/test/FilterByTimeTest.h @@ -24,11 +24,6 @@ using namespace Mantid::API; class FilterByTimeTest : public CxxTest::TestSuite { public: - FilterByTimeTest() - { - } - - /** Setup for loading raw data */ void setUp_Event() { diff --git a/Code/Mantid/Framework/Algorithms/test/FindDeadDetectorsTest.h b/Code/Mantid/Framework/Algorithms/test/FindDeadDetectorsTest.h index 67611f0e91f724efb008a7022d6d1af138d8c0c2..fbe0319fb87977ba6fb7f885d6ceb4f5787cb2e7 100644 --- a/Code/Mantid/Framework/Algorithms/test/FindDeadDetectorsTest.h +++ b/Code/Mantid/Framework/Algorithms/test/FindDeadDetectorsTest.h @@ -20,14 +20,6 @@ using namespace Mantid::DataObjects; class FindDeadDetectorsTest : public CxxTest::TestSuite { public: - - FindDeadDetectorsTest() - { - } - - ~FindDeadDetectorsTest() - {} - void testInit() { FindDeadDetectors alg; diff --git a/Code/Mantid/Framework/Algorithms/test/FindDetectorsOutsideLimitsTest.h b/Code/Mantid/Framework/Algorithms/test/FindDetectorsOutsideLimitsTest.h index 462b86d38f8f3350f1c35707d10753acdb255098..c8aae1d5e1ef6a90ab1dc24c8d2e1fcbed4f6293 100644 --- a/Code/Mantid/Framework/Algorithms/test/FindDetectorsOutsideLimitsTest.h +++ b/Code/Mantid/Framework/Algorithms/test/FindDetectorsOutsideLimitsTest.h @@ -23,14 +23,6 @@ using namespace Mantid::Kernel; class FindDetectorsOutsideLimitsTest : public CxxTest::TestSuite { public: - - FindDetectorsOutsideLimitsTest() - { - } - - ~FindDetectorsOutsideLimitsTest() - {} - void testInit() { FindDetectorsOutsideLimits alg; diff --git a/Code/Mantid/Framework/Algorithms/test/GetDetectorOffsetsTest.h b/Code/Mantid/Framework/Algorithms/test/GetDetectorOffsetsTest.h index 04023c57bbdff5172dab2001746969a09a96f9fc..8cca1ac78672cd13529098e668dc7284166e0ce3 100644 --- a/Code/Mantid/Framework/Algorithms/test/GetDetectorOffsetsTest.h +++ b/Code/Mantid/Framework/Algorithms/test/GetDetectorOffsetsTest.h @@ -18,10 +18,6 @@ using Mantid::DataObjects::OffsetsWorkspace_sptr; class GetDetectorOffsetsTest : public CxxTest::TestSuite { public: - GetDetectorOffsetsTest() - { - } - void testTheBasics() { TS_ASSERT_EQUALS( offsets.name(), "GetDetectorOffsets" ); diff --git a/Code/Mantid/Framework/Algorithms/test/GhostCorrectionTest.h b/Code/Mantid/Framework/Algorithms/test/GhostCorrectionTest.h index caeacab96a69df986be2eddc6901eeb3547ab5c4..ee43acecf1939c8f754bf8afc873ecfd2167660e 100644 --- a/Code/Mantid/Framework/Algorithms/test/GhostCorrectionTest.h +++ b/Code/Mantid/Framework/Algorithms/test/GhostCorrectionTest.h @@ -29,6 +29,11 @@ public: double BIN_DELTA; int NUMPIXELS, NUMBINS; + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static GhostCorrectionTest *createSuite() { return new GhostCorrectionTest(); } + static void destroySuite( GhostCorrectionTest *suite ) { delete suite; } + GhostCorrectionTest() { BIN_DELTA = 2.0; diff --git a/Code/Mantid/Framework/Algorithms/test/He3TubeEfficiencyTest.h b/Code/Mantid/Framework/Algorithms/test/He3TubeEfficiencyTest.h index 690dc28e07ec94d027a258d02a2ea1b02c5db10a..f924b35b567547946f3b9fdcf13728ef1cb78815 100644 --- a/Code/Mantid/Framework/Algorithms/test/He3TubeEfficiencyTest.h +++ b/Code/Mantid/Framework/Algorithms/test/He3TubeEfficiencyTest.h @@ -24,6 +24,11 @@ using namespace std; class He3TubeEfficiencyTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static He3TubeEfficiencyTest *createSuite() { return new He3TubeEfficiencyTest(); } + static void destroySuite( He3TubeEfficiencyTest *suite ) { delete suite; } + He3TubeEfficiencyTest() : inputWS("testInput"), inputEvWS("testEvInput") { } diff --git a/Code/Mantid/Framework/Algorithms/test/IdentifyNoisyDetectorsTest.h b/Code/Mantid/Framework/Algorithms/test/IdentifyNoisyDetectorsTest.h index ccc9a9644454f42e5602e7ab9244a8511fe45930..f4207cf2e0c8ea1ea2aa3f0796aa17cd7d8616b4 100644 --- a/Code/Mantid/Framework/Algorithms/test/IdentifyNoisyDetectorsTest.h +++ b/Code/Mantid/Framework/Algorithms/test/IdentifyNoisyDetectorsTest.h @@ -11,11 +11,7 @@ using namespace Mantid::Algorithms; class IdentifyNoisyDetectorsTest : public CxxTest::TestSuite { - public: - IdentifyNoisyDetectorsTest() {} - ~IdentifyNoisyDetectorsTest() {} - void testMetaInfo() { alg = new IdentifyNoisyDetectors(); @@ -96,4 +92,4 @@ private: }; -#endif /* IDENTIFYNOISYDETECTORSTEST_H_ */ \ No newline at end of file +#endif /* IDENTIFYNOISYDETECTORSTEST_H_ */ diff --git a/Code/Mantid/Framework/Algorithms/test/MultiplyDivideTest.in.h b/Code/Mantid/Framework/Algorithms/test/MultiplyDivideTest.in.h index 6c0e5dd8345e680dbabd0c5be15da6a40c966863..3397f8ae160c0c488628310f95833b275b307e0e 100644 --- a/Code/Mantid/Framework/Algorithms/test/MultiplyDivideTest.in.h +++ b/Code/Mantid/Framework/Algorithms/test/MultiplyDivideTest.in.h @@ -31,6 +31,9 @@ public: bool DO_DIVIDE; std::string message; + static @MULTIPLYDIVIDETEST_CLASS@ *createSuite() { return new @MULTIPLYDIVIDETEST_CLASS@(); } + static void destroySuite( @MULTIPLYDIVIDETEST_CLASS@ *suite ) { delete suite; } + @MULTIPLYDIVIDETEST_CLASS@() { DO_DIVIDE = @MULTIPLYDIVIDETEST_DO_DIVIDE@; diff --git a/Code/Mantid/Framework/Algorithms/test/NormaliseByCurrentTest.h b/Code/Mantid/Framework/Algorithms/test/NormaliseByCurrentTest.h index 728c5442420c89effe349cc1b62f1851554d3fb0..8ffae9285a04d38b50ba760d9dd6a21a59e3850a 100644 --- a/Code/Mantid/Framework/Algorithms/test/NormaliseByCurrentTest.h +++ b/Code/Mantid/Framework/Algorithms/test/NormaliseByCurrentTest.h @@ -18,10 +18,6 @@ using namespace Mantid::DataObjects; class NormaliseByCurrentTest : public CxxTest::TestSuite { public: - NormaliseByCurrentTest() - { - } - void testName() { TS_ASSERT_EQUALS( norm.name(), "NormaliseByCurrent" ); diff --git a/Code/Mantid/Framework/Algorithms/test/PlotAsymmetryByLogValueTest.h b/Code/Mantid/Framework/Algorithms/test/PlotAsymmetryByLogValueTest.h index 0f91c103f8a9df440fac27b79b809f971ac51501..e0c7d61a7ea9238594e21fbce2a0e579b42a2d54 100644 --- a/Code/Mantid/Framework/Algorithms/test/PlotAsymmetryByLogValueTest.h +++ b/Code/Mantid/Framework/Algorithms/test/PlotAsymmetryByLogValueTest.h @@ -18,6 +18,10 @@ using namespace Mantid::DataObjects; class PlotAsymmetryByLogValueTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static PlotAsymmetryByLogValueTest *createSuite() { return new PlotAsymmetryByLogValueTest(); } + static void destroySuite( PlotAsymmetryByLogValueTest *suite ) { delete suite; } PlotAsymmetryByLogValueTest() :firstRun("MUSR00015189.nxs"),lastRun("MUSR00015199.nxs") diff --git a/Code/Mantid/Framework/Algorithms/test/PlusMinusTest.in.h b/Code/Mantid/Framework/Algorithms/test/PlusMinusTest.in.h index 3fbf25b1c6fe459bfe790227c4e024e9e0135b1f..44e5295a7949e97d14da1fbb23ff6b51bc9283b0 100644 --- a/Code/Mantid/Framework/Algorithms/test/PlusMinusTest.in.h +++ b/Code/Mantid/Framework/Algorithms/test/PlusMinusTest.in.h @@ -32,6 +32,9 @@ public: bool DO_PLUS; std::string message; + static @PLUSMINUSTEST_CLASS@ *createSuite() { return new @PLUSMINUSTEST_CLASS@(); } + static void destroySuite( @PLUSMINUSTEST_CLASS@ *suite ) { delete suite; } + @PLUSMINUSTEST_CLASS@() { numBins = 10; diff --git a/Code/Mantid/Framework/Algorithms/test/PoissonErrorsTest.h b/Code/Mantid/Framework/Algorithms/test/PoissonErrorsTest.h index 13e12de53e9bdc590262a618441492bbcc64d678..81040355f173f050b1510e03d0a4c5e17c398701 100644 --- a/Code/Mantid/Framework/Algorithms/test/PoissonErrorsTest.h +++ b/Code/Mantid/Framework/Algorithms/test/PoissonErrorsTest.h @@ -20,6 +20,10 @@ using namespace Mantid::DataObjects; class PoissonErrorsTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static PoissonErrorsTest *createSuite() { return new PoissonErrorsTest(); } + static void destroySuite( PoissonErrorsTest *suite ) { delete suite; } PoissonErrorsTest() { diff --git a/Code/Mantid/Framework/Algorithms/test/QxyTest.h b/Code/Mantid/Framework/Algorithms/test/QxyTest.h index 1454ba5c3d49aa15025771d8b031727abc901cf4..7890899fa664316bc000678f3371f7ee5d6697a1 100644 --- a/Code/Mantid/Framework/Algorithms/test/QxyTest.h +++ b/Code/Mantid/Framework/Algorithms/test/QxyTest.h @@ -12,6 +12,13 @@ using namespace Mantid::Kernel; class QxyTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static QxyTest *createSuite() { return new QxyTest(); } + static void destroySuite( QxyTest *suite ) { delete suite; } + + QxyTest() : m_inputWS("QxyTest_input_in_wav") {} + void testName() { TS_ASSERT_EQUALS( qxy.name(), "Qxy" ) @@ -136,7 +143,6 @@ public: Mantid::API::AnalysisDataService::Instance().remove(outputWS); } - QxyTest() : m_inputWS("QxyTest_input_in_wav") {} private: Mantid::Algorithms::Qxy qxy; const std::string m_inputWS; diff --git a/Code/Mantid/Framework/Algorithms/test/RebinTest.h b/Code/Mantid/Framework/Algorithms/test/RebinTest.h index e2a2af75fa752baa7b5bfe9ddf6a9c5b1d94138c..6b7a64fad1c6c37ddf5b4fc3defaccaa9dad0ae4 100644 --- a/Code/Mantid/Framework/Algorithms/test/RebinTest.h +++ b/Code/Mantid/Framework/Algorithms/test/RebinTest.h @@ -24,6 +24,11 @@ public: double BIN_DELTA; int NUMPIXELS, NUMBINS; + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static RebinTest *createSuite() { return new RebinTest(); } + static void destroySuite( RebinTest *suite ) { delete suite; } + RebinTest() { BIN_DELTA = 2.0; diff --git a/Code/Mantid/Framework/Algorithms/test/RemoveLowResTOFTest.h b/Code/Mantid/Framework/Algorithms/test/RemoveLowResTOFTest.h index 12fcdc2c0e32e647817a61f281a98f26346d8328..1ee08283f9fefb9466c3200154ccfe4853a66e60 100644 --- a/Code/Mantid/Framework/Algorithms/test/RemoveLowResTOFTest.h +++ b/Code/Mantid/Framework/Algorithms/test/RemoveLowResTOFTest.h @@ -47,6 +47,11 @@ private: } public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static RemoveLowResTOFTest *createSuite() { return new RemoveLowResTOFTest(); } + static void destroySuite( RemoveLowResTOFTest *suite ) { delete suite; } + RemoveLowResTOFTest() { BIN_DELTA = 2.; diff --git a/Code/Mantid/Framework/Algorithms/test/RemovePromptPulseTest.h b/Code/Mantid/Framework/Algorithms/test/RemovePromptPulseTest.h index d876103e6290e70bb680909065b5bd1903c870da..260ad791cd92b3718d60d7bb60b63c2d808109a3 100644 --- a/Code/Mantid/Framework/Algorithms/test/RemovePromptPulseTest.h +++ b/Code/Mantid/Framework/Algorithms/test/RemovePromptPulseTest.h @@ -46,6 +46,11 @@ private: } public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static RemovePromptPulseTest *createSuite() { return new RemovePromptPulseTest(); } + static void destroySuite( RemovePromptPulseTest *suite ) { delete suite; } + RemovePromptPulseTest() { BIN_DELTA = 100.; diff --git a/Code/Mantid/Framework/Algorithms/test/ShiftLogTimeTest.h b/Code/Mantid/Framework/Algorithms/test/ShiftLogTimeTest.h index d993abaebd20af0f645e03327db9181194e271be..78d261a49a3aa5e4643308d4f5f813f3b4ea0a5a 100644 --- a/Code/Mantid/Framework/Algorithms/test/ShiftLogTimeTest.h +++ b/Code/Mantid/Framework/Algorithms/test/ShiftLogTimeTest.h @@ -19,6 +19,11 @@ using namespace Mantid::Kernel; class ShiftLogTimeTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static ShiftLogTimeTest *createSuite() { return new ShiftLogTimeTest(); } + static void destroySuite( ShiftLogTimeTest *suite ) { delete suite; } + /// Set up the parameters for what the tests do. ShiftLogTimeTest() { diff --git a/Code/Mantid/Framework/Algorithms/test/SortEventsTest.h b/Code/Mantid/Framework/Algorithms/test/SortEventsTest.h index 4099d016ad74ed53ea5b0dafea3fb11084e76405..3eab063241d22b13786a951cd2f4396e3483b31c 100644 --- a/Code/Mantid/Framework/Algorithms/test/SortEventsTest.h +++ b/Code/Mantid/Framework/Algorithms/test/SortEventsTest.h @@ -22,6 +22,11 @@ public: double BIN_DELTA; int NUMPIXELS, NUMBINS; + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static SortEventsTest *createSuite() { return new SortEventsTest(); } + static void destroySuite( SortEventsTest *suite ) { delete suite; } + SortEventsTest() { BIN_DELTA = 2.0; diff --git a/Code/Mantid/Framework/Algorithms/test/SpatialGroupingTest.h b/Code/Mantid/Framework/Algorithms/test/SpatialGroupingTest.h index 8d6c76d58c93ba0d99ff26a17e97af7de18503f3..dce2d5de50abcf751fc9288168998bec5bf392b2 100644 --- a/Code/Mantid/Framework/Algorithms/test/SpatialGroupingTest.h +++ b/Code/Mantid/Framework/Algorithms/test/SpatialGroupingTest.h @@ -18,9 +18,6 @@ class SpatialGroupingTest : public CxxTest::TestSuite { public: - SpatialGroupingTest() {} - ~SpatialGroupingTest() {} - void testMetaInfo() { alg = new Mantid::Algorithms::SpatialGrouping(); diff --git a/Code/Mantid/Framework/Algorithms/test/SumNeighboursTest.h b/Code/Mantid/Framework/Algorithms/test/SumNeighboursTest.h index 1f6e1f68a4d256376f033af881daf5432cb470c5..7707b17ff39513f9d07100fab32db58cfc91d45d 100644 --- a/Code/Mantid/Framework/Algorithms/test/SumNeighboursTest.h +++ b/Code/Mantid/Framework/Algorithms/test/SumNeighboursTest.h @@ -19,25 +19,6 @@ using namespace Mantid::DataObjects; class SumNeighboursTest : public CxxTest::TestSuite { public: - - SumNeighboursTest() - { -// outputSpace1 = "SNAP_sum"; -// inputSpace = "SNAP"; -// -// Mantid::NeXus::LoadSNSEventNexus loader; -// loader.initialize(); -// loader.setPropertyValue("Filename","/home/janik/data/SNAP_4105_event.nxs"); -// loader.setPropertyValue("OutputWorkspace",inputSpace); -// loader.execute(); - - } - - ~SumNeighboursTest() - {} - - - void testTheBasics() { TS_ASSERT_EQUALS( alg.name(), "SumNeighbours" ); diff --git a/Code/Mantid/Framework/Algorithms/test/TransposeTest.h b/Code/Mantid/Framework/Algorithms/test/TransposeTest.h index 79c2781255bf011348735345bb202e91eee8540f..91c13846cdbcc04e4ce282cd5875672a08e4eefb 100644 --- a/Code/Mantid/Framework/Algorithms/test/TransposeTest.h +++ b/Code/Mantid/Framework/Algorithms/test/TransposeTest.h @@ -16,11 +16,7 @@ using namespace Mantid::DataObjects; class TransposeTest : public CxxTest::TestSuite { - public: - TransposeTest() {} - ~TransposeTest() {} - void testMetaInfo() { transpose = new Transpose(); diff --git a/Code/Mantid/Framework/Algorithms/test/UnwrapSNSTest.h b/Code/Mantid/Framework/Algorithms/test/UnwrapSNSTest.h index 9a2ff41ef81bc77925ad108fcef1666b24e16404..acaa299c3bbbda9eb78231d0914de078c647ac5a 100644 --- a/Code/Mantid/Framework/Algorithms/test/UnwrapSNSTest.h +++ b/Code/Mantid/Framework/Algorithms/test/UnwrapSNSTest.h @@ -39,6 +39,11 @@ private: } public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static UnwrapSNSTest *createSuite() { return new UnwrapSNSTest(); } + static void destroySuite( UnwrapSNSTest *suite ) { delete suite; } + UnwrapSNSTest() { BIN_DELTA = 2.; diff --git a/Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h b/Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h index 4a02f653da1da35d88b2ac4bfb2b72be2cfdb0a8..953a77defa8915a3e16f4dc49d08571038aaa4d5 100644 --- a/Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h +++ b/Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h @@ -48,11 +48,6 @@ using namespace std; class IntegratePeakTimeSlicesTest: public CxxTest::TestSuite { public: - IntegratePeakTimeSlicesTest() - { - - } - void test_abc() { int NRC = 30; diff --git a/Code/Mantid/Framework/Crystal/test/SaveIsawUBTest.h b/Code/Mantid/Framework/Crystal/test/SaveIsawUBTest.h index 25dd8365b5503cd3be39bccf57fa4d08395cd564..90ebde39c49a953f36c8a739913b760b7d89b3d2 100644 --- a/Code/Mantid/Framework/Crystal/test/SaveIsawUBTest.h +++ b/Code/Mantid/Framework/Crystal/test/SaveIsawUBTest.h @@ -36,18 +36,12 @@ using namespace std; class SaveIsawUBTest: public CxxTest::TestSuite { public: - - SaveIsawUBTest() - { - - } - void test_Init() { SaveIsawUB alg; -TS_ASSERT_THROWS_NOTHING ( alg.initialize() ) - TS_ASSERT( alg.isInitialized() ) -} + TS_ASSERT_THROWS_NOTHING ( alg.initialize() ) + TS_ASSERT( alg.isInitialized() ) + } void test_exec() { diff --git a/Code/Mantid/Framework/CurveFitting/test/CompositeFunctionTest.h b/Code/Mantid/Framework/CurveFitting/test/CompositeFunctionTest.h index c912bb19a1bd438d4059774f09870d869f8c3aae..0d7e750360a83818d35622bf7e1080a62c36e938 100644 --- a/Code/Mantid/Framework/CurveFitting/test/CompositeFunctionTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/CompositeFunctionTest.h @@ -169,6 +169,11 @@ DECLARE_FUNCTION(CurveFittingGauss); class CompositeFunctionTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static CompositeFunctionTest *createSuite() { return new CompositeFunctionTest(); } + static void destroySuite( CompositeFunctionTest *suite ) { delete suite; } + CompositeFunctionTest() { Kernel::ConfigService::Instance().setString("curvefitting.peakRadius","100"); diff --git a/Code/Mantid/Framework/CurveFitting/test/ConvolutionTest.h b/Code/Mantid/Framework/CurveFitting/test/ConvolutionTest.h index 5cd6075e3bc61b52fcc700fd2f5bfa48675eb5a1..2af30cf33a8984bf436fca880faf11ed91e09735 100644 --- a/Code/Mantid/Framework/CurveFitting/test/ConvolutionTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/ConvolutionTest.h @@ -146,11 +146,6 @@ DECLARE_FUNCTION(ConvolutionTest_Linear); class ConvolutionTest : public CxxTest::TestSuite { public: - ConvolutionTest() - { - //FrameworkManager::Instance(); - } - void testFunction() { Convolution conv; diff --git a/Code/Mantid/Framework/CurveFitting/test/FitTest.h b/Code/Mantid/Framework/CurveFitting/test/FitTest.h index ae6cbe4111cf07e9ed204af4803680fe69f74dab..fa891593398cff168d15ac25f90c0a41d67fc325 100644 --- a/Code/Mantid/Framework/CurveFitting/test/FitTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/FitTest.h @@ -148,6 +148,11 @@ DECLARE_FUNCTION(FitTest_Linear); class FitTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static FitTest *createSuite() { return new FitTest(); } + static void destroySuite( FitTest *suite ) { delete suite; } + FitTest() { Kernel::ConfigService::Instance().setString("curvefitting.peakRadius","100"); diff --git a/Code/Mantid/Framework/CurveFitting/test/FuncMinimizerFactoryTest.h b/Code/Mantid/Framework/CurveFitting/test/FuncMinimizerFactoryTest.h index 4ddab05a0ada12f02eee02e0c60aad164facee70..555d182de5d49fcca6bfe286fc0fc26fa6597108 100644 --- a/Code/Mantid/Framework/CurveFitting/test/FuncMinimizerFactoryTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/FuncMinimizerFactoryTest.h @@ -57,6 +57,11 @@ DECLARE_FUNCMINIMIZER(FuncMinimizerFactoryTest_A, nedtur); class FuncMinimizerFactoryTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static FuncMinimizerFactoryTest *createSuite() { return new FuncMinimizerFactoryTest(); } + static void destroySuite( FuncMinimizerFactoryTest *suite ) { delete suite; } + FuncMinimizerFactoryTest() { Mantid::API::FrameworkManager::Instance(); diff --git a/Code/Mantid/Framework/CurveFitting/test/FunctionFactoryTest.h b/Code/Mantid/Framework/CurveFitting/test/FunctionFactoryTest.h index 0662542912e536b333cc704d1da766ce4dd5ca9c..8ab8b2d978556222faa0cf7bd405354287989581 100644 --- a/Code/Mantid/Framework/CurveFitting/test/FunctionFactoryTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/FunctionFactoryTest.h @@ -166,6 +166,11 @@ DECLARE_FUNCTION(FunctionFactoryTest_CompFunctB); class FunctionFactoryTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static FunctionFactoryTest *createSuite() { return new FunctionFactoryTest(); } + static void destroySuite( FunctionFactoryTest *suite ) { delete suite; } + FunctionFactoryTest() { Mantid::API::FrameworkManager::Instance(); diff --git a/Code/Mantid/Framework/CurveFitting/test/FunctionTest.h b/Code/Mantid/Framework/CurveFitting/test/FunctionTest.h index 38aecec0ce6463707182c334b82273d9bf346f48..6c89e6efa63cc03b5169a16c94a228ab44bf6d14 100644 --- a/Code/Mantid/Framework/CurveFitting/test/FunctionTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/FunctionTest.h @@ -104,6 +104,11 @@ public: class FunctionTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static FunctionTest *createSuite() { return new FunctionTest(); } + static void destroySuite( FunctionTest *suite ) { delete suite; } + FunctionTest() { FrameworkManager::Instance(); diff --git a/Code/Mantid/Framework/CurveFitting/test/IkedaCarpenterPVTest.h b/Code/Mantid/Framework/CurveFitting/test/IkedaCarpenterPVTest.h index ba6c11602d80114bbf37e3e9f100f5364a45b255..26e0eb8fe2def29f1a2ee9199ff767b23539096b 100644 --- a/Code/Mantid/Framework/CurveFitting/test/IkedaCarpenterPVTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/IkedaCarpenterPVTest.h @@ -32,6 +32,10 @@ using namespace Mantid::DataHandling; class IkedaCarpenterPVTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static IkedaCarpenterPVTest *createSuite() { return new IkedaCarpenterPVTest(); } + static void destroySuite( IkedaCarpenterPVTest *suite ) { delete suite; } IkedaCarpenterPVTest() { diff --git a/Code/Mantid/Framework/CurveFitting/test/LinearTest.h b/Code/Mantid/Framework/CurveFitting/test/LinearTest.h index 949bc39c7fd7f8fa6794c27c5b0541f722ef2209..52d47b355410cbca5b07bc0bb57d18cec61b2e14 100644 --- a/Code/Mantid/Framework/CurveFitting/test/LinearTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/LinearTest.h @@ -11,6 +11,11 @@ using namespace Mantid::Kernel; class LinearTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static LinearTest *createSuite() { return new LinearTest(); } + static void destroySuite( LinearTest *suite ) { delete suite; } + LinearTest() { c0 = 10.0; diff --git a/Code/Mantid/Framework/CurveFitting/test/MultiBGTest.h b/Code/Mantid/Framework/CurveFitting/test/MultiBGTest.h index 3de4eb1633be4f3eefa500aefdbde89c76532917..a2f0e3f9ed9e8beb1d8eda489f6456eae046aeab 100644 --- a/Code/Mantid/Framework/CurveFitting/test/MultiBGTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/MultiBGTest.h @@ -45,6 +45,11 @@ private: class MultiBGTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static MultiBGTest *createSuite() { return new MultiBGTest(); } + static void destroySuite( MultiBGTest *suite ) { delete suite; } + MultiBGTest() { a.resize(2); b.resize(2); diff --git a/Code/Mantid/Framework/CurveFitting/test/PlotPeakByLogValueTest.h b/Code/Mantid/Framework/CurveFitting/test/PlotPeakByLogValueTest.h index fc125585fc3519afd797d3197d7b46f0ccf68fa0..fd6b1f22a7cb445e7333b741f4136456af47d3a9 100644 --- a/Code/Mantid/Framework/CurveFitting/test/PlotPeakByLogValueTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/PlotPeakByLogValueTest.h @@ -45,6 +45,11 @@ private: class PlotPeakByLogValueTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static PlotPeakByLogValueTest *createSuite() { return new PlotPeakByLogValueTest(); } + static void destroySuite( PlotPeakByLogValueTest *suite ) { delete suite; } + PlotPeakByLogValueTest() { FrameworkManager::Instance(); diff --git a/Code/Mantid/Framework/CurveFitting/test/ResolutionTest.h b/Code/Mantid/Framework/CurveFitting/test/ResolutionTest.h index 79008cc89e0be574aa84970f5fce049c5b1e841a..e20fa52e0d3e59bb4eeb90626b81ca1b34e21b84 100644 --- a/Code/Mantid/Framework/CurveFitting/test/ResolutionTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/ResolutionTest.h @@ -89,6 +89,10 @@ DECLARE_FUNCTION(ResolutionTest_Gauss); class ResolutionTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static ResolutionTest *createSuite() { return new ResolutionTest(); } + static void destroySuite( ResolutionTest *suite ) { delete suite; } ResolutionTest() :resH(3),resS(acos(0.)), diff --git a/Code/Mantid/Framework/DataHandling/test/LoadMuonLogTest.h b/Code/Mantid/Framework/DataHandling/test/LoadMuonLogTest.h index d4a6a769a76f507d31a788cd785f963a60a13fd3..58aaf4f334d0e1c5acf6babe78def95dd7661751 100644 --- a/Code/Mantid/Framework/DataHandling/test/LoadMuonLogTest.h +++ b/Code/Mantid/Framework/DataHandling/test/LoadMuonLogTest.h @@ -30,12 +30,6 @@ using Mantid::DataHandling::LoadMuonLog; class LoadMuonLogTest : public CxxTest::TestSuite { public: - - LoadMuonLogTest() - { - //initialise framework manager to allow logging - //Mantid::API::FrameworkManager::Instance().initialize(); - } void testInit() { TS_ASSERT( !loader.isInitialized() ); diff --git a/Code/Mantid/Framework/DataHandling/test/SaveNexusProcessedTest.h b/Code/Mantid/Framework/DataHandling/test/SaveNexusProcessedTest.h index d033da6b0ad66b92e49d8cf627ba4cb5f80697c4..5fe3727102f3a87cb009824509d9ebf6b695b591 100644 --- a/Code/Mantid/Framework/DataHandling/test/SaveNexusProcessedTest.h +++ b/Code/Mantid/Framework/DataHandling/test/SaveNexusProcessedTest.h @@ -35,6 +35,10 @@ using namespace Mantid::NeXus; class SaveNexusProcessedTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static SaveNexusProcessedTest *createSuite() { return new SaveNexusProcessedTest(); } + static void destroySuite( SaveNexusProcessedTest *suite ) { delete suite; } SaveNexusProcessedTest() { diff --git a/Code/Mantid/Framework/DataObjects/test/EventListTest.h b/Code/Mantid/Framework/DataObjects/test/EventListTest.h index 363f697e8feaf7ec4769b7697e5dd89704dc9f9a..01ca2f5e7ef35771253b5f6716bd8b091e57bbe3 100644 --- a/Code/Mantid/Framework/DataObjects/test/EventListTest.h +++ b/Code/Mantid/Framework/DataObjects/test/EventListTest.h @@ -29,6 +29,11 @@ private: public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static EventListTest *createSuite() { return new EventListTest(); } + static void destroySuite( EventListTest *suite ) { delete suite; } + EventListTest() { BIN_DELTA = 10000; diff --git a/Code/Mantid/Framework/DataObjects/test/EventWorkspaceTest.h b/Code/Mantid/Framework/DataObjects/test/EventWorkspaceTest.h index f3b2d5bc8b3ef37655322d0a24d1d2dd91018667..5bd9af42d029e9916b9ad6034ece2acaa5d04bba 100644 --- a/Code/Mantid/Framework/DataObjects/test/EventWorkspaceTest.h +++ b/Code/Mantid/Framework/DataObjects/test/EventWorkspaceTest.h @@ -46,6 +46,10 @@ private: int NUMPIXELS, NUMBINS, NUMEVENTS, BIN_DELTA; public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static EventWorkspaceTest *createSuite() { return new EventWorkspaceTest(); } + static void destroySuite( EventWorkspaceTest *suite ) { delete suite; } EventWorkspaceTest() { diff --git a/Code/Mantid/Framework/DataObjects/test/ManagedDataBlock2DTest.h b/Code/Mantid/Framework/DataObjects/test/ManagedDataBlock2DTest.h index 14e515440054bbec1a856960106d0ed2b09f2346..bafc8bd0fcd98d69a9418c059ed82529a0e98e1e 100644 --- a/Code/Mantid/Framework/DataObjects/test/ManagedDataBlock2DTest.h +++ b/Code/Mantid/Framework/DataObjects/test/ManagedDataBlock2DTest.h @@ -13,6 +13,11 @@ using Mantid::MantidVecPtr; class ManagedDataBlock2DTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static ManagedDataBlock2DTest *createSuite() { return new ManagedDataBlock2DTest(); } + static void destroySuite( ManagedDataBlock2DTest *suite ) { delete suite; } + ManagedDataBlock2DTest() : data(0,2,4,3, NULL, MantidVecPtr() ) { diff --git a/Code/Mantid/Framework/DataObjects/test/RefAxisTest.h b/Code/Mantid/Framework/DataObjects/test/RefAxisTest.h index f5c317a77b9172aec5c0421c16bdbbaac7bbc26f..ad23ec0d073fa5630f98bd09f7a8f7e320eec0b7 100644 --- a/Code/Mantid/Framework/DataObjects/test/RefAxisTest.h +++ b/Code/Mantid/Framework/DataObjects/test/RefAxisTest.h @@ -17,6 +17,11 @@ using namespace Mantid::Kernel; class RefAxisTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static RefAxisTest *createSuite() { return new RefAxisTest(); } + static void destroySuite( RefAxisTest *suite ) { delete suite; } + RefAxisTest() { // Set up two small workspaces for these tests diff --git a/Code/Mantid/Framework/DataObjects/test/TableWorkspacePropertyTest.h b/Code/Mantid/Framework/DataObjects/test/TableWorkspacePropertyTest.h index c9a9f7eab7c7ec863563040e5cc7859b201426ad..b86243c61f3b231d8d597b08428caab3df8b13a2 100644 --- a/Code/Mantid/Framework/DataObjects/test/TableWorkspacePropertyTest.h +++ b/Code/Mantid/Framework/DataObjects/test/TableWorkspacePropertyTest.h @@ -58,6 +58,11 @@ void TableWorkspaceAlgorithm::exec() class TableWorkspacePropertyTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static TableWorkspacePropertyTest *createSuite() { return new TableWorkspacePropertyTest(); } + static void destroySuite( TableWorkspacePropertyTest *suite ) { delete suite; } + TableWorkspacePropertyTest() { t.reset(new TableWorkspace(10)); diff --git a/Code/Mantid/Framework/DataObjects/test/TofEventTest.h b/Code/Mantid/Framework/DataObjects/test/TofEventTest.h index d7f9f2cf469f1d0807eb5150615d324c2efbeea1..a2f7bbd7e37af3b2c238fefec4491360c16e4787 100644 --- a/Code/Mantid/Framework/DataObjects/test/TofEventTest.h +++ b/Code/Mantid/Framework/DataObjects/test/TofEventTest.h @@ -22,6 +22,11 @@ private: TofEvent e; public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static TofEventTest *createSuite() { return new TofEventTest(); } + static void destroySuite( TofEventTest *suite ) { delete suite; } + TofEventTest() { e = TofEvent(123, 456); diff --git a/Code/Mantid/Framework/DataObjects/test/WeightedEventNoTimeTest.h b/Code/Mantid/Framework/DataObjects/test/WeightedEventNoTimeTest.h index 4532bc40df97123edeeaf1cb31be18c39e6b4170..860e4a900f5ac028fa41d16d4332cf78af8307b1 100644 --- a/Code/Mantid/Framework/DataObjects/test/WeightedEventNoTimeTest.h +++ b/Code/Mantid/Framework/DataObjects/test/WeightedEventNoTimeTest.h @@ -19,13 +19,7 @@ using std::vector; //========================================================================================== class WeightedEventNoTimeTest : public CxxTest::TestSuite { -private: - public: - WeightedEventNoTimeTest() - { - } - void testConstructors() { TofEvent e(123, 456); diff --git a/Code/Mantid/Framework/DataObjects/test/WeightedEventTest.h b/Code/Mantid/Framework/DataObjects/test/WeightedEventTest.h index d2e646b2117ac8eb97dd67b49c56b4fdab7b2e5f..fec3f024a2a7f75ec44198bf49acbb397ed595ee 100644 --- a/Code/Mantid/Framework/DataObjects/test/WeightedEventTest.h +++ b/Code/Mantid/Framework/DataObjects/test/WeightedEventTest.h @@ -19,13 +19,7 @@ using std::vector; //========================================================================================== class WeightedEventTest : public CxxTest::TestSuite { -private: - public: - WeightedEventTest() - { - } - void testConstructors() { TofEvent e(123, 456); diff --git a/Code/Mantid/Framework/DataObjects/test/Workspace2DTest.h b/Code/Mantid/Framework/DataObjects/test/Workspace2DTest.h index 5e6d94f27f2ee44b62e66810a67ad52b6bdf4c27..018eca484c0c194fb2fddd86e70fff807c7d5809 100644 --- a/Code/Mantid/Framework/DataObjects/test/Workspace2DTest.h +++ b/Code/Mantid/Framework/DataObjects/test/Workspace2DTest.h @@ -24,6 +24,11 @@ public: int nbins, nhist; Workspace2D_sptr ws; + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static Workspace2DTest *createSuite() { return new Workspace2DTest(); } + static void destroySuite( Workspace2DTest *suite ) { delete suite; } + Workspace2DTest() { nbins = 5; diff --git a/Code/Mantid/Framework/DataObjects/test/WorkspaceValidatorsTest.h b/Code/Mantid/Framework/DataObjects/test/WorkspaceValidatorsTest.h index ab1e0ce198cdc25343e9ad1d0ebc7647e4d67d3c..42db9aba65179eccb9f29bf9a52aae3689ab720c 100644 --- a/Code/Mantid/Framework/DataObjects/test/WorkspaceValidatorsTest.h +++ b/Code/Mantid/Framework/DataObjects/test/WorkspaceValidatorsTest.h @@ -25,6 +25,11 @@ private: MatrixWorkspace_sptr ws2; public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static WorkspaceValidatorsTest *createSuite() { return new WorkspaceValidatorsTest(); } + static void destroySuite( WorkspaceValidatorsTest *suite ) { delete suite; } + WorkspaceValidatorsTest() { wavUnitVal = new WorkspaceUnitValidator<>("Wavelength"); diff --git a/Code/Mantid/Framework/Geometry/test/MDDimensionTest.h b/Code/Mantid/Framework/Geometry/test/MDDimensionTest.h index d500ff9d7181e0f81b35ee8a492d9038b6e5cde9..f565ff5fd19a34a0d7119c2acb135ca885d13334 100644 --- a/Code/Mantid/Framework/Geometry/test/MDDimensionTest.h +++ b/Code/Mantid/Framework/Geometry/test/MDDimensionTest.h @@ -61,6 +61,10 @@ class MDDimensionTest : public CxxTest::TestSuite tDimensionRes *pResDim; tDimension *pOrtDim; public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static MDDimensionTest *createSuite() { return new MDDimensionTest(); } + static void destroySuite( MDDimensionTest *suite ) { delete suite; } void testPublicConstructor() { diff --git a/Code/Mantid/Framework/Geometry/test/MDGeometryBasisTest.h b/Code/Mantid/Framework/Geometry/test/MDGeometryBasisTest.h index 9996bb7d55823ecb8ddf1df69f371ab6768fe1a7..7c22289f4457b62b0b6c48593e4b541b7eee1cc3 100644 --- a/Code/Mantid/Framework/Geometry/test/MDGeometryBasisTest.h +++ b/Code/Mantid/Framework/Geometry/test/MDGeometryBasisTest.h @@ -169,10 +169,6 @@ public: TSM_ASSERT_EQUALS("Each DIM_id obrained has to belong to dimensions",true,mdBasis->checkIdCompartibility(dimID)); } - ~MDGeometryBasisTest() - { - } - }; diff --git a/Code/Mantid/Framework/Geometry/test/MDGeometryTest.h b/Code/Mantid/Framework/Geometry/test/MDGeometryTest.h index ce93edfb985acf3fb5d7dddb7aaf5ad333c27785..135941571dc67d6c76d7691d398f9a2204c45cdb 100644 --- a/Code/Mantid/Framework/Geometry/test/MDGeometryTest.h +++ b/Code/Mantid/Framework/Geometry/test/MDGeometryTest.h @@ -69,7 +69,12 @@ class MDGeometryTest : public CxxTest::TestSuite std::auto_ptr<testMDGeometry> tDND_geometry; std::auto_ptr<MDGeometryDescription> pSlice; + public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static MDGeometryTest *createSuite() { return new MDGeometryTest(); } + static void destroySuite( MDGeometryTest *suite ) { delete suite; } MDGeometryTest() { diff --git a/Code/Mantid/Framework/Geometry/test/ParInstrumentTest.h b/Code/Mantid/Framework/Geometry/test/ParInstrumentTest.h index fc0010e50c54da997e3152dc58707c7f1384e7b9..82733dfb6d07c0a4c51f2fe8a47f7e47c1da0e38 100644 --- a/Code/Mantid/Framework/Geometry/test/ParInstrumentTest.h +++ b/Code/Mantid/Framework/Geometry/test/ParInstrumentTest.h @@ -14,6 +14,11 @@ using namespace Mantid::Geometry; class ParInstrumentTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static ParInstrumentTest *createSuite() { return new ParInstrumentTest(); } + static void destroySuite( ParInstrumentTest *suite ) { delete suite; } + ParInstrumentTest() { instrument.reset(new Instrument); diff --git a/Code/Mantid/Framework/Geometry/test/ParametrizedComponentTest.h b/Code/Mantid/Framework/Geometry/test/ParametrizedComponentTest.h index 5658e2ca7f9cde585eb3335d0e6ef84af8ded680..918c55c7620b388c3abd6a5506e01eae0786ba0c 100644 --- a/Code/Mantid/Framework/Geometry/test/ParametrizedComponentTest.h +++ b/Code/Mantid/Framework/Geometry/test/ParametrizedComponentTest.h @@ -23,6 +23,10 @@ using Mantid::Kernel::Quat; class ParametrizedComponentTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static ParametrizedComponentTest *createSuite() { return new ParametrizedComponentTest(); } + static void destroySuite( ParametrizedComponentTest *suite ) { delete suite; } ParametrizedComponentTest() : m_parentComp(NULL), m_childOneComp(NULL), m_childTwoComp(NULL), m_paramMap(), m_strName("StringParam"), m_strValue("test-string"), m_dblName("DblParam"), m_dblValue(10.0), diff --git a/Code/Mantid/Framework/Kernel/test/RegexStringsTest.h b/Code/Mantid/Framework/Kernel/test/RegexStringsTest.h index 05106e0ea56a110aa4b31c06d51c892240fd256e..8fcd735074667ba5ae9b4b275fbc3ee0463ae223 100644 --- a/Code/Mantid/Framework/Kernel/test/RegexStringsTest.h +++ b/Code/Mantid/Framework/Kernel/test/RegexStringsTest.h @@ -23,6 +23,9 @@ private: std::stringstream testStream; public: + static RegexStringsTest *createSuite() { return new RegexStringsTest(); } + static void destroySuite(RegexStringsTest *suite) { delete suite; } + RegexStringsTest() { testStream << "2007-11-16T13:25:48 END\n" diff --git a/Code/Mantid/Framework/MDAlgorithms/test/CPRebinKeepPixTest.h b/Code/Mantid/Framework/MDAlgorithms/test/CPRebinKeepPixTest.h index d559eb12c15c570d178c3aeef6fb94e113caa9af..b257af6b4c024a66fa15281208ed04a7d2d88fdb 100644 --- a/Code/Mantid/Framework/MDAlgorithms/test/CPRebinKeepPixTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/CPRebinKeepPixTest.h @@ -92,8 +92,6 @@ class CPRebinKeepPixTest : public CxxTest::TestSuite AnalysisDataService::Instance().remove("CPRebinKeepPixTestOut"); } - ~CPRebinKeepPixTest(){ - } }; diff --git a/Code/Mantid/Framework/MDAlgorithms/test/CobaltSWDTest.h b/Code/Mantid/Framework/MDAlgorithms/test/CobaltSWDTest.h index 3c91b08c98939a0caea4206f01c9d2d6f0b343b4..ea086669e83dae29bdacc0a7801d10fedc495ef2 100644 --- a/Code/Mantid/Framework/MDAlgorithms/test/CobaltSWDTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/CobaltSWDTest.h @@ -305,8 +305,6 @@ private: public: - CobaltSWDTest() {}; - // create a test data set of 6 MDPoints contributing to 4 MDCells with 1, 2 and 3, 4 points each. void testInit() { diff --git a/Code/Mantid/Framework/MDAlgorithms/test/Load_MDWorkspaceTest.h b/Code/Mantid/Framework/MDAlgorithms/test/Load_MDWorkspaceTest.h index 8b139061f8a6e84292d15b8980a94fd4eed1dd65..14d20f34f0d47391c56491482633a8f27af60cd6 100644 --- a/Code/Mantid/Framework/MDAlgorithms/test/Load_MDWorkspaceTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/Load_MDWorkspaceTest.h @@ -70,8 +70,5 @@ class Load_MDWorkspaceTest : public CxxTest::TestSuite } -~Load_MDWorkspaceTest(){ -} - }; #endif diff --git a/Code/Mantid/Framework/MDAlgorithms/test/PlaneImplicitFunctionTest.h b/Code/Mantid/Framework/MDAlgorithms/test/PlaneImplicitFunctionTest.h index 3517b5ac013d377bc512b5f0920bb52f4f1b3e6b..56dca3d3e8d89232cf78de5d47c03c92a3b9948b 100644 --- a/Code/Mantid/Framework/MDAlgorithms/test/PlaneImplicitFunctionTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/PlaneImplicitFunctionTest.h @@ -25,6 +25,10 @@ private: const double PI; public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static PlaneImplicitFunctionTest *createSuite() { return new PlaneImplicitFunctionTest(); } + static void destroySuite( PlaneImplicitFunctionTest *suite ) { delete suite; } PlaneImplicitFunctionTest() : normal(1, 1, 1), origin(2, 3, 4), width(2), PI(3.14159265) diff --git a/Code/Mantid/Framework/MDAlgorithms/test/QuadEnBackgroundTest.h b/Code/Mantid/Framework/MDAlgorithms/test/QuadEnBackgroundTest.h index 749cf7af40c816f5b8af0f5be35d49609e5a2b62..398e30099e0a4b65406dffdb90f385fdc59c8108 100644 --- a/Code/Mantid/Framework/MDAlgorithms/test/QuadEnBackgroundTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/QuadEnBackgroundTest.h @@ -303,8 +303,6 @@ private: public: - QuadEnBackgroundTest() {}; - // create a test data set of 6 MDPoints contributing to 4 MDCells with 1, 2 and 3, 4 points each. void testInit() { diff --git a/Code/Mantid/Framework/MDAlgorithms/test/RunParamTest.h b/Code/Mantid/Framework/MDAlgorithms/test/RunParamTest.h index 7ec7912aebc791742973201aabb3cec122b034ef..e5ae691ea23de5b18399b873eec2e38e09d7371e 100644 --- a/Code/Mantid/Framework/MDAlgorithms/test/RunParamTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/RunParamTest.h @@ -25,8 +25,6 @@ private: public: - RunParamTest() {}; - // set up a simple RunParam object and test void testInit() { diff --git a/Code/Mantid/Framework/MDAlgorithms/test/SimulateMDDataTest.h b/Code/Mantid/Framework/MDAlgorithms/test/SimulateMDDataTest.h index 7c430956e460f629d06ae4d7c420c2263a07660c..c0f0f4e87f4a5e886586f1437bdcd8aeaef52c8a 100644 --- a/Code/Mantid/Framework/MDAlgorithms/test/SimulateMDDataTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/SimulateMDDataTest.h @@ -222,8 +222,6 @@ private: public: - SimulateMDDataTest() {}; - // create a test data set of 3 pixels contributing to 2 points to 1 cut void testInit() { diff --git a/Code/Mantid/Framework/MDAlgorithms/test/TobyFitSimulateTest.h b/Code/Mantid/Framework/MDAlgorithms/test/TobyFitSimulateTest.h index 3fe36ce625ea2d4d5412aac6860673182ad1b109..f524711778013036daccdf5c231d6725e28b9098 100644 --- a/Code/Mantid/Framework/MDAlgorithms/test/TobyFitSimulateTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/TobyFitSimulateTest.h @@ -221,8 +221,6 @@ private: public: - TobyFitSimulateTest() {}; - // create a test data set of 3 pixels contributing to 2 points to 1 cut void testInit() { diff --git a/Code/Mantid/Framework/MDDataObjects/test/MDDPoints_MemManagerTest.h b/Code/Mantid/Framework/MDDataObjects/test/MDDPoints_MemManagerTest.h index c47db171eb2a03ebbff842fde79034fa69beead2..fbed4aea616d68728f7c1f7fd772c91aa3ade230 100644 --- a/Code/Mantid/Framework/MDDataObjects/test/MDDPoints_MemManagerTest.h +++ b/Code/Mantid/Framework/MDDataObjects/test/MDDPoints_MemManagerTest.h @@ -470,6 +470,11 @@ public: } + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static MDDPoints_MemManagerTest *createSuite() { return new MDDPoints_MemManagerTest(); } + static void destroySuite( MDDPoints_MemManagerTest *suite ) { delete suite; } + MDDPoints_MemManagerTest():pMemMan(NULL){}; ~MDDPoints_MemManagerTest(){ if(pMemMan)delete pMemMan; @@ -478,4 +483,4 @@ public: }; -#endif \ No newline at end of file +#endif diff --git a/Code/Mantid/Framework/MDDataObjects/test/MDDataPointTest.h b/Code/Mantid/Framework/MDDataObjects/test/MDDataPointTest.h index fe544ea5589bad2145901c33518284235960214c..3a0e481674da48434596eb82924fb42372d2a06c 100644 --- a/Code/Mantid/Framework/MDDataObjects/test/MDDataPointTest.h +++ b/Code/Mantid/Framework/MDDataObjects/test/MDDataPointTest.h @@ -464,6 +464,10 @@ public: } } + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static MDDataPointTest *createSuite() { return new MDDataPointTest(); } + static void destroySuite( MDDataPointTest *suite ) { delete suite; } MDDataPointTest() { diff --git a/Code/Mantid/Framework/MDDataObjects/test/MD_FileFactoryTest.h b/Code/Mantid/Framework/MDDataObjects/test/MD_FileFactoryTest.h index 5334aea78469872ab1033b0ab5999e04fcefbbf5..11a561205e85c8c3c8d6c798d3212b8ff9dd27e1 100644 --- a/Code/Mantid/Framework/MDDataObjects/test/MD_FileFactoryTest.h +++ b/Code/Mantid/Framework/MDDataObjects/test/MD_FileFactoryTest.h @@ -66,8 +66,6 @@ public: TSM_ASSERT("FileFormat factory have not returned a pointer to a Horace file reader ",dynamic_cast<HoraceReader::MD_FileHoraceReader*>(horaceFormat.get())!=0); } - ~MD_FileFactoryTest(){ - } }; diff --git a/Code/Mantid/Framework/MDEvents/test/MDEventWorkspaceTest.h b/Code/Mantid/Framework/MDEvents/test/MDEventWorkspaceTest.h index a7338de243f01f8f21226bb7cd3b9717e0fed2dd..30c4031b6f7d1e44ac06f631fcdb4c4b846d1828 100644 --- a/Code/Mantid/Framework/MDEvents/test/MDEventWorkspaceTest.h +++ b/Code/Mantid/Framework/MDEvents/test/MDEventWorkspaceTest.h @@ -33,6 +33,11 @@ using namespace Mantid::Geometry; class MDEventWorkspaceTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static MDEventWorkspaceTest *createSuite() { return new MDEventWorkspaceTest(); } + static void destroySuite( MDEventWorkspaceTest *suite ) { delete suite; } + bool DODEBUG; MDEventWorkspaceTest() { diff --git a/Code/Mantid/Framework/MDEvents/test/MDGridBoxTest.h b/Code/Mantid/Framework/MDEvents/test/MDGridBoxTest.h index d5e76434b5c9622d711be67ae9b3b043de3c0c04..809443119340167edf125803f52e1b567508677b 100644 --- a/Code/Mantid/Framework/MDEvents/test/MDGridBoxTest.h +++ b/Code/Mantid/Framework/MDEvents/test/MDGridBoxTest.h @@ -41,14 +41,17 @@ using namespace Mantid::Geometry; class MDGridBoxTest : public CxxTest::TestSuite { public: + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static MDGridBoxTest *createSuite() { return new MDGridBoxTest(); } + static void destroySuite( MDGridBoxTest *suite ) { delete suite; } + bool DODEBUG; MDGridBoxTest() { DODEBUG = false; } -public: - //------------------------------------------------------------------------------------- void test_MDBoxConstructor() { diff --git a/Code/Mantid/Framework/Nexus/test/NexusAPITest.h b/Code/Mantid/Framework/Nexus/test/NexusAPITest.h index 830397032a12a35347089ec1f05ba39902c852da..177c3a6574f820c7caecee0b65e0717d54bf96ad 100644 --- a/Code/Mantid/Framework/Nexus/test/NexusAPITest.h +++ b/Code/Mantid/Framework/Nexus/test/NexusAPITest.h @@ -44,6 +44,11 @@ public: vector<float> r4_array; vector<double> r8_array; + // This pair of boilerplate methods prevent the suite being created statically + // This means the constructor isn't called when running other tests + static NexusAPITest *createSuite() { return new NexusAPITest(); } + static void destroySuite( NexusAPITest *suite ) { delete suite; } + NexusAPITest() {