From ec947a67cf1c0c612860af114a0b6f01695d69ad Mon Sep 17 00:00:00 2001 From: Michael Wedel Date: Thu, 26 Jun 2014 09:22:31 +0200 Subject: [PATCH] Refs #9445. Removed using namespace from PoldiMockInstrumentHelpers.h Had to adjust two unit tests to use the namespaces instead. --- .../PoldiMockInstrumentHelpers.h | 27 +++++++++---------- .../SINQ/test/PoldiBasicChopperTest.h | 1 + .../Framework/SINQ/test/PoldiDetectorTest.h | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Code/Mantid/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h b/Code/Mantid/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h index 3e14b484df3b..1089e979a716 100644 --- a/Code/Mantid/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h +++ b/Code/Mantid/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h @@ -15,7 +15,6 @@ #include "MantidGeometry/Instrument/FitParameter.h" #include "MantidKernel/Interpolation.h" -using namespace Mantid::Geometry; using ::testing::Return; @@ -114,26 +113,26 @@ class MockChopper : public PoldiAbstractChopper } }; -class PoldiFakeSourceComponent : public ObjComponent +class PoldiFakeSourceComponent : public Geometry::ObjComponent { public: PoldiFakeSourceComponent() : ObjComponent("FakePoldiSource", 0) {} }; -class PoldiAbstractFakeInstrument : public Instrument +class PoldiAbstractFakeInstrument : public Geometry::Instrument { public: PoldiAbstractFakeInstrument() {} - virtual boost::shared_ptr getComponentByName(const std::string &cname, int nlevels = 0) const { + virtual boost::shared_ptr getComponentByName(const std::string &cname, int nlevels = 0) const { UNUSED_ARG(cname); UNUSED_ARG(nlevels); return getComponentByNameFake(); } - virtual boost::shared_ptr getComponentByNameFake() const = 0; + virtual boost::shared_ptr getComponentByNameFake() const = 0; }; class PoldiValidSourceFakeInstrument : public PoldiAbstractFakeInstrument @@ -142,9 +141,9 @@ class PoldiValidSourceFakeInstrument : public PoldiAbstractFakeInstrument PoldiValidSourceFakeInstrument() : PoldiAbstractFakeInstrument() {} - boost::shared_ptr getComponentByNameFake() const + boost::shared_ptr getComponentByNameFake() const { - return boost::shared_ptr(new PoldiFakeSourceComponent); + return boost::shared_ptr(new PoldiFakeSourceComponent); } }; @@ -154,28 +153,28 @@ class PoldiInvalidSourceFakeInstrument : public PoldiAbstractFakeInstrument PoldiInvalidSourceFakeInstrument() : PoldiAbstractFakeInstrument() {} - boost::shared_ptr getComponentByNameFake() const + boost::shared_ptr getComponentByNameFake() const { - return boost::shared_ptr(); + return boost::shared_ptr(); } }; -class PoldiValidFakeParameterMap : public ParameterMap +class PoldiValidFakeParameterMap : public Geometry::ParameterMap { public: - PoldiValidFakeParameterMap(const IComponent *component) : - ParameterMap() + PoldiValidFakeParameterMap(const Geometry::IComponent *component) : + Geometry::ParameterMap() { add("fitting", component, "WavelengthDistribution", Mantid::Geometry::FitParameter()); } }; -class PoldiInvalidFakeParameterMap : public ParameterMap +class PoldiInvalidFakeParameterMap : public Geometry::ParameterMap { public: PoldiInvalidFakeParameterMap() : - ParameterMap() + Geometry::ParameterMap() { } diff --git a/Code/Mantid/Framework/SINQ/test/PoldiBasicChopperTest.h b/Code/Mantid/Framework/SINQ/test/PoldiBasicChopperTest.h index 5ffc61cf3de8..fe80941f549f 100644 --- a/Code/Mantid/Framework/SINQ/test/PoldiBasicChopperTest.h +++ b/Code/Mantid/Framework/SINQ/test/PoldiBasicChopperTest.h @@ -9,6 +9,7 @@ using namespace Mantid; using namespace Mantid::API; using namespace Mantid::Poldi; +using namespace Mantid::Geometry; class TestablePoldiBasicChopper : public PoldiBasicChopper { diff --git a/Code/Mantid/Framework/SINQ/test/PoldiDetectorTest.h b/Code/Mantid/Framework/SINQ/test/PoldiDetectorTest.h index a4a50e9d47f1..283ad94b9e13 100644 --- a/Code/Mantid/Framework/SINQ/test/PoldiDetectorTest.h +++ b/Code/Mantid/Framework/SINQ/test/PoldiDetectorTest.h @@ -14,6 +14,7 @@ using namespace Mantid::API; using namespace Mantid::Kernel; using namespace Mantid::Poldi; using namespace Mantid::DataObjects; +using namespace Mantid::Geometry; class TestablePoldiHeliumDetector : public ConfiguredHeliumDetector {