diff --git a/Framework/API/inc/MantidAPI/CommonBinsValidator.h b/Framework/API/inc/MantidAPI/CommonBinsValidator.h index fb979e1b574f03308f8273d2667858037e6f0100..491e1fb63f0be05d84dc65edf01712a834195f4b 100644 --- a/Framework/API/inc/MantidAPI/CommonBinsValidator.h +++ b/Framework/API/inc/MantidAPI/CommonBinsValidator.h @@ -6,7 +6,7 @@ namespace Mantid { namespace API { -/** +/** A validator which provides a <I>TENTATIVE</I> check that a workspace contains common bins in each spectrum. For efficiency reasons, it only checks that the first and last spectra have diff --git a/Framework/API/inc/MantidAPI/HistogramValidator.h b/Framework/API/inc/MantidAPI/HistogramValidator.h index e27522e1f2103b75cba8bb7fdb5c2bcc5bad4371..a576d266ab28b1e245530d693cfeb04cb16b4f80 100644 --- a/Framework/API/inc/MantidAPI/HistogramValidator.h +++ b/Framework/API/inc/MantidAPI/HistogramValidator.h @@ -6,7 +6,7 @@ namespace Mantid { namespace API { -/** +/** A validator which checks that a workspace contains histogram data (the default) or point data as required. diff --git a/Framework/API/inc/MantidAPI/IncreasingAxisValidator.h b/Framework/API/inc/MantidAPI/IncreasingAxisValidator.h index fd7e413c6688d39a10da95e3e61eab35ab1b2e52..95965219c77caeaf436903e4c4daba4a470940cd 100644 --- a/Framework/API/inc/MantidAPI/IncreasingAxisValidator.h +++ b/Framework/API/inc/MantidAPI/IncreasingAxisValidator.h @@ -6,7 +6,7 @@ namespace Mantid { namespace API { -/** +/** A validator which checks that the X axis of a workspace is increasing from left to right. @@ -43,7 +43,6 @@ private: std::string checkValidity(const MatrixWorkspace_sptr &value) const; }; - } // namespace API } // namespace Mantid diff --git a/Framework/API/inc/MantidAPI/InstrumentValidator.h b/Framework/API/inc/MantidAPI/InstrumentValidator.h index f448510a245b8cd677a01d990ba930d5f6b6be8a..3362f8c80ce5ce06cd966bd0bdaab282e7b5d558 100644 --- a/Framework/API/inc/MantidAPI/InstrumentValidator.h +++ b/Framework/API/inc/MantidAPI/InstrumentValidator.h @@ -51,7 +51,6 @@ private: unsigned int m_requires; }; - } // namespace API } // namespace Mantid diff --git a/Framework/API/inc/MantidAPI/MatrixWorkspaceValidator.h b/Framework/API/inc/MantidAPI/MatrixWorkspaceValidator.h index c77272bab0d7d88af52fc2611208c60fa36056a8..6c3cbea5d0d74875d1513478d8404ba2a423d307 100644 --- a/Framework/API/inc/MantidAPI/MatrixWorkspaceValidator.h +++ b/Framework/API/inc/MantidAPI/MatrixWorkspaceValidator.h @@ -36,7 +36,6 @@ namespace API { class MANTID_API_DLL MatrixWorkspaceValidator : public Kernel::TypedValidator<MatrixWorkspace_sptr> {}; - } // namespace API } // namespace Mantid diff --git a/Framework/API/inc/MantidAPI/NumericAxisValidator.h b/Framework/API/inc/MantidAPI/NumericAxisValidator.h index 3b8f2fb7974ab3ffa440c639aeba8efe2f156c56..e33deb71603395a8004fea88f9a049a9c2a8c14f 100644 --- a/Framework/API/inc/MantidAPI/NumericAxisValidator.h +++ b/Framework/API/inc/MantidAPI/NumericAxisValidator.h @@ -47,7 +47,6 @@ private: const int m_axisNumber; }; - } // namespace API } // namespace Mantid diff --git a/Framework/API/inc/MantidAPI/RawCountValidator.h b/Framework/API/inc/MantidAPI/RawCountValidator.h index d7de38a8a062e997714c48c3c0b5a6467d9ddd97..fe3e2655ee66e7d611a2f2155281e3da5166451f 100644 --- a/Framework/API/inc/MantidAPI/RawCountValidator.h +++ b/Framework/API/inc/MantidAPI/RawCountValidator.h @@ -47,7 +47,6 @@ private: const bool m_mustNotBeDistribution; }; - } // namespace API } // namespace Mantid diff --git a/Framework/API/inc/MantidAPI/SampleValidator.h b/Framework/API/inc/MantidAPI/SampleValidator.h index a0ee557d14fa32c6ac2616f59e1386b67df7d8c9..38685e032578314d1dad514b881a7df534630b1f 100644 --- a/Framework/API/inc/MantidAPI/SampleValidator.h +++ b/Framework/API/inc/MantidAPI/SampleValidator.h @@ -44,7 +44,6 @@ private: unsigned int m_requires; }; - } // namespace API } // namespace Mantid diff --git a/Framework/API/inc/MantidAPI/WorkspaceUnitValidator.h b/Framework/API/inc/MantidAPI/WorkspaceUnitValidator.h index 81527ff4b549d185dfa4751447e0dd952544e8f8..f4ddf3a9133d3e3434e7c26c3c4510c4a95968e6 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceUnitValidator.h +++ b/Framework/API/inc/MantidAPI/WorkspaceUnitValidator.h @@ -6,7 +6,7 @@ namespace Mantid { namespace API { -/** +/** A validator which checks that the unit of the workspace referred to by a WorkspaceProperty is the expected one. @@ -47,7 +47,6 @@ private: const std::string m_unitID; }; - } // namespace API } // namespace Mantid diff --git a/Framework/API/src/CommonBinsValidator.cpp b/Framework/API/src/CommonBinsValidator.cpp index 0692db8c0148e2fb261a8383fd6d97104cc392aa..86871c6be5121ffff037b111437adb95d1c73725 100644 --- a/Framework/API/src/CommonBinsValidator.cpp +++ b/Framework/API/src/CommonBinsValidator.cpp @@ -14,7 +14,8 @@ Kernel::IValidator_sptr CommonBinsValidator::clone() const { * @param value :: The workspace to test * @return A message for users saying that bins are different, otherwise "" */ -std::string CommonBinsValidator::checkValidity(const MatrixWorkspace_sptr &value) const { +std::string +CommonBinsValidator::checkValidity(const MatrixWorkspace_sptr &value) const { if (!value) return "Enter an existing workspace"; if (value->isCommonBins()) diff --git a/Framework/API/src/HistogramValidator.cpp b/Framework/API/src/HistogramValidator.cpp index 817ff4e05a4028723a9aafbbbdbb71a2eeb4e5be..603eedde2e6fe60bbc5c401a826780e58732de44 100644 --- a/Framework/API/src/HistogramValidator.cpp +++ b/Framework/API/src/HistogramValidator.cpp @@ -11,7 +11,7 @@ namespace API { * (false). */ HistogramValidator::HistogramValidator(const bool &mustBeHistogram) - : MatrixWorkspaceValidator(), m_mustBeHistogram(mustBeHistogram) {} + : MatrixWorkspaceValidator(), m_mustBeHistogram(mustBeHistogram) {} /// Clone the current state Kernel::IValidator_sptr HistogramValidator::clone() const { @@ -23,7 +23,8 @@ Kernel::IValidator_sptr HistogramValidator::clone() const { * @param value :: The workspace to test * @return A user level description if a problem exists or "" */ -std::string HistogramValidator::checkValidity(const MatrixWorkspace_sptr &value) const { +std::string +HistogramValidator::checkValidity(const MatrixWorkspace_sptr &value) const { if (m_mustBeHistogram) { if (value->isHistogramData()) return ""; diff --git a/Framework/API/src/IncreasingAxisValidator.cpp b/Framework/API/src/IncreasingAxisValidator.cpp index cd147c9c89a3dba4a62cf69459a76b9df122dda8..6d653af5335b0494dc6630dadf2bb2d73b9c0449 100644 --- a/Framework/API/src/IncreasingAxisValidator.cpp +++ b/Framework/API/src/IncreasingAxisValidator.cpp @@ -15,7 +15,8 @@ Kernel::IValidator_sptr IncreasingAxisValidator::clone() const { * @param value The workspace to check * @return "" if is valid, otherwise a user level description of a problem */ -std::string IncreasingAxisValidator::checkValidity(const MatrixWorkspace_sptr &value) const { +std::string IncreasingAxisValidator::checkValidity( + const MatrixWorkspace_sptr &value) const { // 0 for X axis Axis *xAxis = value->getAxis(0); @@ -24,7 +25,7 @@ std::string IncreasingAxisValidator::checkValidity(const MatrixWorkspace_sptr &v if (xAxis->length() > 1 && xAxis->getValue(0) >= xAxis->getValue(xAxis->length() - 1)) return "X axis of the workspace should be increasing from left to " - "right"; + "right"; else return ""; } diff --git a/Framework/API/src/NumericAxisValidator.cpp b/Framework/API/src/NumericAxisValidator.cpp index 6ad6af287b419e4eea8efced8d8b3b52f0b1f4dd..1273e248df1b5813a3a7a402a806313b558a2e1c 100644 --- a/Framework/API/src/NumericAxisValidator.cpp +++ b/Framework/API/src/NumericAxisValidator.cpp @@ -7,7 +7,8 @@ namespace API { /** Class constructor with parameter. * @param axisNumber :: set the axis number to validate */ -NumericAxisValidator::NumericAxisValidator(const int &axisNumber) : m_axisNumber(axisNumber) {} +NumericAxisValidator::NumericAxisValidator(const int &axisNumber) + : m_axisNumber(axisNumber) {} /// Clone the current state Kernel::IValidator_sptr NumericAxisValidator::clone() const { @@ -18,7 +19,8 @@ Kernel::IValidator_sptr NumericAxisValidator::clone() const { * @param value :: The workspace to test * @return A message for users with negative results, otherwise "" */ -std::string NumericAxisValidator::checkValidity(const MatrixWorkspace_sptr &value) const { +std::string +NumericAxisValidator::checkValidity(const MatrixWorkspace_sptr &value) const { Mantid::API::Axis *axis = value->getAxis(m_axisNumber); if (axis->isNumeric()) return ""; diff --git a/Framework/API/src/RawCountValidator.cpp b/Framework/API/src/RawCountValidator.cpp index 71c3fa06fdd30b97b8c80d595fadf400f62f7041..1ab11c81051199aaecd51a7113b999cb187ac811 100644 --- a/Framework/API/src/RawCountValidator.cpp +++ b/Framework/API/src/RawCountValidator.cpp @@ -6,7 +6,8 @@ namespace API { /** Constructor * @param mustNotBeDistribution :: Flag indicating whether the check is that - * a workspace should not be a distribution (true, default) or should be (false). + * a workspace should not be a distribution (true, default) or should be + * (false). */ RawCountValidator::RawCountValidator(const bool &mustNotBeDistribution) : m_mustNotBeDistribution(mustNotBeDistribution) {} @@ -21,7 +22,8 @@ Kernel::IValidator_sptr RawCountValidator::clone() const { * @return A user level description of any problem that exists or "" no * problem */ -std::string RawCountValidator::checkValidity(const MatrixWorkspace_sptr &value) const { +std::string +RawCountValidator::checkValidity(const MatrixWorkspace_sptr &value) const { if (m_mustNotBeDistribution) { if (!value->isDistribution()) return ""; diff --git a/Framework/API/src/SpectraAxisValidator.cpp b/Framework/API/src/SpectraAxisValidator.cpp index 6af7226a117a40ccb175ac079add56f360bde17c..312c8dabd9a2e931fca08b50e51a1828f4bdf0b3 100644 --- a/Framework/API/src/SpectraAxisValidator.cpp +++ b/Framework/API/src/SpectraAxisValidator.cpp @@ -7,7 +7,8 @@ namespace API { /** Class constructor with parameter. * @param axisNumber :: set the axis number to validate */ -SpectraAxisValidator::SpectraAxisValidator(const int &axisNumber) : m_axisNumber(axisNumber) {} +SpectraAxisValidator::SpectraAxisValidator(const int &axisNumber) + : m_axisNumber(axisNumber) {} /// Clone the current validator Kernel::IValidator_sptr SpectraAxisValidator::clone() const { @@ -18,7 +19,8 @@ Kernel::IValidator_sptr SpectraAxisValidator::clone() const { * @param value :: The workspace to test * @return A message for users with negative results, otherwise "" */ -std::string SpectraAxisValidator::checkValidity(const MatrixWorkspace_sptr &value) const { +std::string +SpectraAxisValidator::checkValidity(const MatrixWorkspace_sptr &value) const { Mantid::API::Axis *axis = value->getAxis(m_axisNumber); if (axis->isSpectra()) return ""; diff --git a/Framework/API/src/WorkspaceUnitValidator.cpp b/Framework/API/src/WorkspaceUnitValidator.cpp index f6fdf18c7f0e940da9f5518732f775d9f883e486..23be6cc30aef9f4a7666df856d68da63d3246037 100644 --- a/Framework/API/src/WorkspaceUnitValidator.cpp +++ b/Framework/API/src/WorkspaceUnitValidator.cpp @@ -14,7 +14,7 @@ namespace API { WorkspaceUnitValidator::WorkspaceUnitValidator(const std::string &unitID) : MatrixWorkspaceValidator(), m_unitID(unitID) {} -/** +/** * Clone the current state */ Kernel::IValidator_sptr WorkspaceUnitValidator::clone() const { @@ -27,26 +27,27 @@ Kernel::IValidator_sptr WorkspaceUnitValidator::clone() const { * @param value :: The workspace to test * @return A user level description of the error or "" for no error */ -std::string WorkspaceUnitValidator::checkValidity(const MatrixWorkspace_sptr &value) const { +std::string +WorkspaceUnitValidator::checkValidity(const MatrixWorkspace_sptr &value) const { // This effectively checks for single-valued workspaces if (value->axes() == 0) return "A single valued workspace has no unit, which is required for " - "this algorithm"; + "this algorithm"; Kernel::Unit_const_sptr unit = value->getAxis(0)->unit(); // If m_unitID is empty it means that the workspace must have units, which // can be anything if (m_unitID.empty()) { - return (unit && (!boost::dynamic_pointer_cast<const Kernel::Units::Empty>( - unit)) - ? "" - : "The workspace must have units"); + return ( + unit && (!boost::dynamic_pointer_cast<const Kernel::Units::Empty>(unit)) + ? "" + : "The workspace must have units"); } // now check if the units of the workspace is correct else { if ((!unit) || (unit->unitID().compare(m_unitID))) { return "The workspace must have units of " + - m_unitID; //+ "; its unit is: " + unit->caption(); + m_unitID; //+ "; its unit is: " + unit->caption(); } else return ""; } diff --git a/Framework/API/test/CommonBinsValidatorTest.h b/Framework/API/test/CommonBinsValidatorTest.h index 52c30750034566c87b65deafb7d010242c940558..9b685d71e8d49f3be308a34e220fca417ba52444 100644 --- a/Framework/API/test/CommonBinsValidatorTest.h +++ b/Framework/API/test/CommonBinsValidatorTest.h @@ -12,53 +12,49 @@ class CommonBinsValidatorTest : 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 CommonBinsValidatorTest *createSuite() { return new CommonBinsValidatorTest(); } - static void destroySuite( CommonBinsValidatorTest *suite ) { delete suite; } + static CommonBinsValidatorTest *createSuite() { + return new CommonBinsValidatorTest(); + } + static void destroySuite(CommonBinsValidatorTest *suite) { delete suite; } - void test_empty() - { + void test_empty() { auto ws = boost::make_shared<WorkspaceTester>(); CommonBinsValidator validator; TS_ASSERT_EQUALS(validator.isValid(ws), ""); } - void xtest_zero_length_bins() - { + void xtest_zero_length_bins() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); CommonBinsValidator validator; TS_ASSERT_EQUALS(validator.isValid(ws), ""); } - void test_common_bins() - { + void test_common_bins() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(3, 11, 10); - for(size_t k = 0; k < 3; ++k) - for(size_t i = 0; i < 11; ++i) - { - auto di = double(i); - ws->dataX(k)[i] = di * (1.0 + 0.001 * di); - } + for (size_t k = 0; k < 3; ++k) + for (size_t i = 0; i < 11; ++i) { + auto di = double(i); + ws->dataX(k)[i] = di * (1.0 + 0.001 * di); + } CommonBinsValidator validator; TS_ASSERT_EQUALS(validator.isValid(ws), ""); } - void test_diff_bins() - { + void test_diff_bins() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(3, 11, 10); - for(size_t k = 0; k < 3; ++k) - for(size_t i = 0; i < 11; ++i) - { - auto di = double(i + k); - ws->dataX(k)[i] = di * (1.0 + 0.001 * di); - } + for (size_t k = 0; k < 3; ++k) + for (size_t i = 0; i < 11; ++i) { + auto di = double(i + k); + ws->dataX(k)[i] = di * (1.0 + 0.001 * di); + } CommonBinsValidator validator; - TS_ASSERT_EQUALS(validator.isValid(ws), "The workspace must have common bin boundaries for all histograms"); + TS_ASSERT_EQUALS( + validator.isValid(ws), + "The workspace must have common bin boundaries for all histograms"); } - }; - #endif /* MANTID_API_COMMONBINSVALIDATORTEST_H_ */ \ No newline at end of file diff --git a/Framework/API/test/HistogramValidatorTest.h b/Framework/API/test/HistogramValidatorTest.h index 5e506df1cf5efe0b3189762395614c77022460c9..d916627aee046d72a71fbdae5e05ccc7cea69901 100644 --- a/Framework/API/test/HistogramValidatorTest.h +++ b/Framework/API/test/HistogramValidatorTest.h @@ -12,28 +12,25 @@ class HistogramValidatorTest : 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 HistogramValidatorTest *createSuite() { return new HistogramValidatorTest(); } - static void destroySuite( HistogramValidatorTest *suite ) { delete suite; } - + static HistogramValidatorTest *createSuite() { + return new HistogramValidatorTest(); + } + static void destroySuite(HistogramValidatorTest *suite) { delete suite; } - void test_success() - { + void test_success() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); HistogramValidator validator; TS_ASSERT_EQUALS(validator.isValid(ws), ""); } - void test_fail() - { + void test_fail() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 10, 10); HistogramValidator validator; - TS_ASSERT_EQUALS(validator.isValid(ws), "The workspace must contain histogram data"); + TS_ASSERT_EQUALS(validator.isValid(ws), + "The workspace must contain histogram data"); } - - }; - #endif /* MANTID_API_HISTOGRAMVALIDATORTEST_H_ */ \ No newline at end of file diff --git a/Framework/API/test/InstrumentValidatorTest.h b/Framework/API/test/InstrumentValidatorTest.h index 72a78d16204229dbd471fe61b6957636b8f35752..3edaddca83aa70324e9fa179fae8492a85d41f67 100644 --- a/Framework/API/test/InstrumentValidatorTest.h +++ b/Framework/API/test/InstrumentValidatorTest.h @@ -14,13 +14,15 @@ class InstrumentValidatorTest : 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 InstrumentValidatorTest *createSuite() { return new InstrumentValidatorTest(); } - static void destroySuite( InstrumentValidatorTest *suite ) { delete suite; } + static InstrumentValidatorTest *createSuite() { + return new InstrumentValidatorTest(); + } + static void destroySuite(InstrumentValidatorTest *suite) { delete suite; } - void test_success() - { + void test_success() { auto ws = boost::make_shared<WorkspaceTester>(); - auto instr = boost::make_shared<Mantid::Geometry::Instrument>("TestInstrument"); + auto instr = + boost::make_shared<Mantid::Geometry::Instrument>("TestInstrument"); ws->setInstrument(instr); // Define a sample as a simple sphere auto sample = new Mantid::Geometry::ObjComponent( @@ -35,15 +37,13 @@ public: TS_ASSERT_EQUALS(validator.checkValidity(ws), ""); } - void test_fail() - { + void test_fail() { auto ws = boost::make_shared<WorkspaceTester>(); InstrumentValidator validator; - TS_ASSERT_EQUALS(validator.checkValidity(ws), "The instrument is missing the following components: sample holder"); + TS_ASSERT_EQUALS( + validator.checkValidity(ws), + "The instrument is missing the following components: sample holder"); } - - }; - #endif /* MANTID_API_INSTRUMENTVALIDATORTEST_H_ */ \ No newline at end of file diff --git a/Framework/API/test/NumericAxisValidatorTest.h b/Framework/API/test/NumericAxisValidatorTest.h index 70df673a9ff11caf867634832f401c2df74d649e..d33e9c5948abfbd590e5f38257edaad1d30a5c06 100644 --- a/Framework/API/test/NumericAxisValidatorTest.h +++ b/Framework/API/test/NumericAxisValidatorTest.h @@ -12,12 +12,12 @@ class NumericAxisValidatorTest : 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 NumericAxisValidatorTest *createSuite() { return new NumericAxisValidatorTest(); } - static void destroySuite( NumericAxisValidatorTest *suite ) { delete suite; } - + static NumericAxisValidatorTest *createSuite() { + return new NumericAxisValidatorTest(); + } + static void destroySuite(NumericAxisValidatorTest *suite) { delete suite; } - void test_success() - { + void test_success() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); auto newAxis = new NumericAxis(2); @@ -26,16 +26,14 @@ public: TS_ASSERT_EQUALS(validator.isValid(ws), ""); } - void test_fail() - { + void test_fail() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); NumericAxisValidator validator; - TS_ASSERT_EQUALS(validator.isValid(ws), "A workspace with axis being a Numeric Axis is required here."); + TS_ASSERT_EQUALS( + validator.isValid(ws), + "A workspace with axis being a Numeric Axis is required here."); } - - }; - #endif /* MANTID_API_NUMERICAXISVALIDATORTEST_H_ */ \ No newline at end of file diff --git a/Framework/API/test/RawCountValidatorTest.h b/Framework/API/test/RawCountValidatorTest.h index 0dccddd22f0c054cbcbee9160dc92b733968455a..5b8692dcb0d23081a011b69607ffee2fcea4a846 100644 --- a/Framework/API/test/RawCountValidatorTest.h +++ b/Framework/API/test/RawCountValidatorTest.h @@ -12,27 +12,25 @@ class RawCountValidatorTest : 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 RawCountValidatorTest *createSuite() { return new RawCountValidatorTest(); } - static void destroySuite( RawCountValidatorTest *suite ) { delete suite; } - + static RawCountValidatorTest *createSuite() { + return new RawCountValidatorTest(); + } + static void destroySuite(RawCountValidatorTest *suite) { delete suite; } - void test_success() - { + void test_success() { auto ws = boost::make_shared<WorkspaceTester>(); RawCountValidator validator; TS_ASSERT_EQUALS(validator.isValid(ws), ""); } - void test_fail() - { + void test_fail() { auto ws = boost::make_shared<WorkspaceTester>(); ws->isDistribution(true); RawCountValidator validator; - TS_ASSERT_EQUALS(validator.isValid(ws), "A workspace containing numbers of counts is required here"); + TS_ASSERT_EQUALS( + validator.isValid(ws), + "A workspace containing numbers of counts is required here"); } - - }; - #endif /* MANTID_API_RAWCOUNTVALIDATORTEST_H_ */ \ No newline at end of file diff --git a/Framework/API/test/SampleValidatorTest.h b/Framework/API/test/SampleValidatorTest.h index 1a0f38be56cddb5c3e359b3bff06f89964096b80..abb1dcd897ff8c091f14bddb21d7a754af1bd47c 100644 --- a/Framework/API/test/SampleValidatorTest.h +++ b/Framework/API/test/SampleValidatorTest.h @@ -13,31 +13,31 @@ class SampleValidatorTest : 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 SampleValidatorTest *createSuite() { return new SampleValidatorTest(); } - static void destroySuite( SampleValidatorTest *suite ) { delete suite; } - + static SampleValidatorTest *createSuite() { + return new SampleValidatorTest(); + } + static void destroySuite(SampleValidatorTest *suite) { delete suite; } - void test_fail() - { + void test_fail() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); SampleValidator validator; - TS_ASSERT_EQUALS(validator.isValid(ws), "The sample is missing the following properties: shape,material"); + TS_ASSERT_EQUALS( + validator.isValid(ws), + "The sample is missing the following properties: shape,material"); } - void test_success() - { + void test_success() { auto ws = boost::make_shared<WorkspaceTester>(); auto sphere = ComponentCreationHelper::createSphere(1.0, V3D(), "sphere"); - Mantid::Kernel::Material material("stuff", Mantid::PhysicalConstants::NeutronAtom(), 10); + Mantid::Kernel::Material material( + "stuff", Mantid::PhysicalConstants::NeutronAtom(), 10); sphere->setMaterial(material); ws->mutableSample().setShape(*sphere); SampleValidator validator; TS_ASSERT_EQUALS(validator.checkValidity(ws), ""); } - }; - #endif /* MANTID_API_SAMPLEVALIDATORTEST_H_ */ \ No newline at end of file diff --git a/Framework/API/test/SpectraAxisValidatorTest.h b/Framework/API/test/SpectraAxisValidatorTest.h index e2ffd1391ff3caeabaa600e43f0b9f9448558de1..c1cdc4ca28170885f8e9f87a2d32171a73f6d080 100644 --- a/Framework/API/test/SpectraAxisValidatorTest.h +++ b/Framework/API/test/SpectraAxisValidatorTest.h @@ -12,28 +12,28 @@ class SpectraAxisValidatorTest : 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 SpectraAxisValidatorTest *createSuite() { return new SpectraAxisValidatorTest(); } - static void destroySuite( SpectraAxisValidatorTest *suite ) { delete suite; } + static SpectraAxisValidatorTest *createSuite() { + return new SpectraAxisValidatorTest(); + } + static void destroySuite(SpectraAxisValidatorTest *suite) { delete suite; } - void test_fail() - { + void test_fail() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); auto newAxis = new NumericAxis(2); ws->replaceAxis(1, newAxis); SpectraAxisValidator validator; - TS_ASSERT_EQUALS(validator.isValid(ws), "A workspace with axis being Spectra Number is required here."); + TS_ASSERT_EQUALS( + validator.isValid(ws), + "A workspace with axis being Spectra Number is required here."); } - void test_success() - { + void test_success() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); SpectraAxisValidator validator; TS_ASSERT_EQUALS(validator.isValid(ws), ""); } - }; - #endif /* MANTID_API_SPECTRAAXISVALIDATORTEST_H_ */ \ No newline at end of file diff --git a/Framework/API/test/WorkspaceUnitValidatorTest.h b/Framework/API/test/WorkspaceUnitValidatorTest.h index d77fd7482d36b644a73cd6e40a19f3364affc529..d2e86987bdd4a6ff7eddbaae445081d3b076fc2f 100644 --- a/Framework/API/test/WorkspaceUnitValidatorTest.h +++ b/Framework/API/test/WorkspaceUnitValidatorTest.h @@ -12,29 +12,25 @@ class WorkspaceUnitValidatorTest : 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 WorkspaceUnitValidatorTest *createSuite() { return new WorkspaceUnitValidatorTest(); } - static void destroySuite( WorkspaceUnitValidatorTest *suite ) { delete suite; } - + static WorkspaceUnitValidatorTest *createSuite() { + return new WorkspaceUnitValidatorTest(); + } + static void destroySuite(WorkspaceUnitValidatorTest *suite) { delete suite; } - void test_fail() - { + void test_fail() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); WorkspaceUnitValidator validator; TS_ASSERT_EQUALS(validator.isValid(ws), "The workspace must have units"); } - void test_success() - { + void test_success() { auto ws = boost::make_shared<WorkspaceTester>(); ws->init(2, 11, 10); ws->getAxis(0)->setUnit("TOF"); WorkspaceUnitValidator validator; TS_ASSERT_EQUALS(validator.isValid(ws), ""); } - - }; - #endif /* MANTID_API_WORKSPACEUNITVALIDATORTEST_H_ */ \ No newline at end of file diff --git a/Framework/Algorithms/src/FilterBadPulses.cpp b/Framework/Algorithms/src/FilterBadPulses.cpp index 73ed88b964e4c2bf79e28d910dd70dce39e2e423..1a437b32dfc0395a9adaaf9803eb62f6573811ed 100644 --- a/Framework/Algorithms/src/FilterBadPulses.cpp +++ b/Framework/Algorithms/src/FilterBadPulses.cpp @@ -10,7 +10,6 @@ #include "MantidKernel/UnitFactory.h" #include "MantidKernel/V3D.h" - namespace Mantid { namespace Algorithms { // Register the algorithm into the algorithm factory diff --git a/Framework/Algorithms/src/Rebin.cpp b/Framework/Algorithms/src/Rebin.cpp index 95b3a59e1492d3a74628cef20c5e82cb3b7ebe21..678c303e3f1cd727b9fa5eca42004f28725cd96b 100644 --- a/Framework/Algorithms/src/Rebin.cpp +++ b/Framework/Algorithms/src/Rebin.cpp @@ -9,7 +9,6 @@ #include "MantidKernel/RebinParamsValidator.h" #include "MantidKernel/VectorHelper.h" - namespace Mantid { namespace Algorithms { diff --git a/Framework/Crystal/src/AnvredCorrection.cpp b/Framework/Crystal/src/AnvredCorrection.cpp index a5601e06cbf9f7d496c98d4eb6287d8edd78a935..3f49fb8f31e249c413db7af989bb4df0f6715e8b 100644 --- a/Framework/Crystal/src/AnvredCorrection.cpp +++ b/Framework/Crystal/src/AnvredCorrection.cpp @@ -78,8 +78,7 @@ AnvredCorrection::AnvredCorrection() void AnvredCorrection::init() { // The input workspace must have an instrument and units of wavelength - auto wsValidator = - boost::make_shared<InstrumentValidator>(); + auto wsValidator = boost::make_shared<InstrumentValidator>(); declareProperty(new WorkspaceProperty<>("InputWorkspace", "", Direction::Input, wsValidator), diff --git a/Framework/Crystal/src/NormaliseVanadium.cpp b/Framework/Crystal/src/NormaliseVanadium.cpp index 8d63925baefe49ff6b5c329155ab35700058ac31..cc42991e91367cbaa260fc5dcbe71aa58e7792cc 100644 --- a/Framework/Crystal/src/NormaliseVanadium.cpp +++ b/Framework/Crystal/src/NormaliseVanadium.cpp @@ -27,7 +27,7 @@ NormaliseVanadium::NormaliseVanadium() : API::Algorithm() {} void NormaliseVanadium::init() { // The input workspace must have an instrument and units of wavelength auto wsValidator = boost::make_shared<InstrumentValidator>(); - + declareProperty(new WorkspaceProperty<>("InputWorkspace", "", Direction::Input, wsValidator), "The X values for the input workspace must be in units of " diff --git a/Framework/DataHandling/src/SaveCanSAS1D2.cpp b/Framework/DataHandling/src/SaveCanSAS1D2.cpp index 63f917381d98290ece3a5606bfe703ae36945626..df414fa039447c4febfc5e44d9cc6a9f8a54cea0 100644 --- a/Framework/DataHandling/src/SaveCanSAS1D2.cpp +++ b/Framework/DataHandling/src/SaveCanSAS1D2.cpp @@ -12,7 +12,6 @@ #include "MantidKernel/Exception.h" #include "MantidKernel/MantidVersion.h" - //----------------------------------------------------------------------------- using namespace Mantid::Kernel; using namespace Mantid::Geometry;