Skip to content
Snippets Groups Projects
Commit 5876a775 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Suppress remaining -Wsuggest-override warnings.

parent 141dbd5a
No related branches found
No related tags found
No related merge requests found
Showing
with 92 additions and 51 deletions
...@@ -3,17 +3,16 @@ ...@@ -3,17 +3,16 @@
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include "MantidAPI/FunctionParameterDecorator.h"
#include "MantidAPI/CompositeFunction.h" #include "MantidAPI/CompositeFunction.h"
#include "MantidAPI/ParamFunction.h"
#include "MantidAPI/FunctionFactory.h" #include "MantidAPI/FunctionFactory.h"
#include "MantidAPI/FunctionParameterDecorator.h"
#include "MantidAPI/ParamFunction.h"
#include "MantidAPI/WorkspaceGroup.h" #include "MantidAPI/WorkspaceGroup.h"
#include "MantidKernel/Exception.h" #include "MantidKernel/Exception.h"
#include "MantidKernel/WarningSuppressions.h"
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
#include <gtest/gtest.h>
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include <gtest/gtest.h>
using namespace Mantid::API; using namespace Mantid::API;
using namespace Mantid::Kernel; using namespace Mantid::Kernel;
...@@ -432,7 +431,9 @@ private: ...@@ -432,7 +431,9 @@ private:
class MockTestableFunctionParameterDecorator class MockTestableFunctionParameterDecorator
: public TestableFunctionParameterDecorator { : public TestableFunctionParameterDecorator {
public: public:
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_METHOD1(beforeDecoratedFunctionSet, void(const IFunction_sptr &)); MOCK_METHOD1(beforeDecoratedFunctionSet, void(const IFunction_sptr &));
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
}; };
......
#ifndef ILIVELISTENER_TEST_H_ #ifndef ILIVELISTENER_TEST_H_
#define ILIVELISTENER_TEST_H_ #define ILIVELISTENER_TEST_H_
#include "MantidAPI/ILiveListener.h"
#include "MantidKernel/WarningSuppressions.h"
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "MantidAPI/ILiveListener.h"
using namespace Mantid::API; using namespace Mantid::API;
...@@ -14,6 +15,7 @@ public: ...@@ -14,6 +15,7 @@ public:
// Set this flag to true for testing // Set this flag to true for testing
m_dataReset = true; m_dataReset = true;
} }
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(name, std::string()); MOCK_CONST_METHOD0(name, std::string());
MOCK_CONST_METHOD0(supportsHistory, bool()); MOCK_CONST_METHOD0(supportsHistory, bool());
MOCK_CONST_METHOD0(buffersEvents, bool()); MOCK_CONST_METHOD0(buffersEvents, bool());
...@@ -23,6 +25,7 @@ public: ...@@ -23,6 +25,7 @@ public:
MOCK_METHOD0(isConnected, bool()); MOCK_METHOD0(isConnected, bool());
MOCK_METHOD0(runStatus, RunStatus()); MOCK_METHOD0(runStatus, RunStatus());
MOCK_CONST_METHOD0(runNumber, int()); MOCK_CONST_METHOD0(runNumber, int());
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
class ILiveListenerTest : public CxxTest::TestSuite { class ILiveListenerTest : public CxxTest::TestSuite {
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include <vector> #include <vector>
#include "MantidAPI/ImplicitFunctionParameterParser.h"
#include "MantidAPI/ImplicitFunctionParameterParserFactory.h" #include "MantidAPI/ImplicitFunctionParameterParserFactory.h"
#include "MantidKernel/ConfigService.h" #include "MantidKernel/ConfigService.h"
#include "MantidAPI/ImplicitFunctionParameterParser.h" #include "MantidKernel/WarningSuppressions.h"
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
...@@ -16,11 +17,11 @@ private: ...@@ -16,11 +17,11 @@ private:
class MockImplicitFunctionParameter class MockImplicitFunctionParameter
: public Mantid::API::ImplicitFunctionParameter { : public Mantid::API::ImplicitFunctionParameter {
public: public:
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(getName, std::string()); MOCK_CONST_METHOD0(getName, std::string());
MOCK_CONST_METHOD0(isValid, bool()); MOCK_CONST_METHOD0(isValid, bool());
MOCK_CONST_METHOD0(toXMLString, std::string()); MOCK_CONST_METHOD0(toXMLString, std::string());
~MockImplicitFunctionParameter() override {} GCC_DIAG_ON_SUGGEST_OVERRIDE
protected: protected:
ImplicitFunctionParameter *clone() const override { ImplicitFunctionParameter *clone() const override {
return new MockImplicitFunctionParameter; return new MockImplicitFunctionParameter;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define MANTID_API_MODERATORMODELTEST_H_ #define MANTID_API_MODERATORMODELTEST_H_
#include "MantidAPI/ModeratorModel.h" #include "MantidAPI/ModeratorModel.h"
#include "MantidKernel/WarningSuppressions.h"
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include <gmock/gmock.h> #include <gmock/gmock.h>
...@@ -12,11 +13,13 @@ public: ...@@ -12,11 +13,13 @@ public:
boost::shared_ptr<ModeratorModel> clone() const override { boost::shared_ptr<ModeratorModel> clone() const override {
return boost::shared_ptr<MockModerator>(); return boost::shared_ptr<MockModerator>();
} }
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(emissionTimeMean, double()); MOCK_CONST_METHOD0(emissionTimeMean, double());
MOCK_CONST_METHOD0(emissionTimeVariance, double()); MOCK_CONST_METHOD0(emissionTimeVariance, double());
MOCK_CONST_METHOD1(sampleTimeDistribution, double(const double)); MOCK_CONST_METHOD1(sampleTimeDistribution, double(const double));
MOCK_METHOD2(setParameterValue, MOCK_METHOD2(setParameterValue,
void(const std::string &, const std::string &)); void(const std::string &, const std::string &));
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
class ModeratorModelTest : public CxxTest::TestSuite { class ModeratorModelTest : public CxxTest::TestSuite {
......
#ifndef MANTID_API_WORKSPACEGROUPTEST_H_ #ifndef MANTID_API_WORKSPACEGROUPTEST_H_
#define MANTID_API_WORKSPACEGROUPTEST_H_ #define MANTID_API_WORKSPACEGROUPTEST_H_
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/WorkspaceGroup.h"
#include "MantidKernel/Exception.h"
#include "MantidKernel/System.h" #include "MantidKernel/System.h"
#include "MantidKernel/Timer.h" #include "MantidKernel/Timer.h"
#include "MantidKernel/Exception.h" #include "MantidKernel/WarningSuppressions.h"
#include "MantidAPI/WorkspaceGroup.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidTestHelpers/FakeObjects.h" #include "MantidTestHelpers/FakeObjects.h"
#include "PropertyManagerHelper.h" #include "PropertyManagerHelper.h"
...@@ -54,12 +55,13 @@ private: ...@@ -54,12 +55,13 @@ private:
// Helper type, representing some concrete workspace type. // Helper type, representing some concrete workspace type.
class MockWorkspace : public Mantid::API::Workspace { class MockWorkspace : public Mantid::API::Workspace {
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(id, const std::string()); MOCK_CONST_METHOD0(id, const std::string());
MOCK_CONST_METHOD0(name, const std::string()); MOCK_CONST_METHOD0(name, const std::string());
MOCK_CONST_METHOD0(threadSafe, bool()); MOCK_CONST_METHOD0(threadSafe, bool());
MOCK_CONST_METHOD0(toString, const std::string()); MOCK_CONST_METHOD0(toString, const std::string());
MOCK_CONST_METHOD0(getMemorySize, size_t()); MOCK_CONST_METHOD0(getMemorySize, size_t());
GCC_DIAG_ON_SUGGEST_OVERRIDE
private: private:
MockWorkspace *doClone() const override { MockWorkspace *doClone() const override {
throw std::runtime_error("Cloning of MockWorkspace is not implemented."); throw std::runtime_error("Cloning of MockWorkspace is not implemented.");
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include "MantidAlgorithms/SampleCorrections/MCAbsorptionStrategy.h"
#include "MantidAlgorithms/SampleCorrections/IBeamProfile.h" #include "MantidAlgorithms/SampleCorrections/IBeamProfile.h"
#include "MantidAlgorithms/SampleCorrections/MCAbsorptionStrategy.h"
#include "MantidKernel/WarningSuppressions.h"
#include "MonteCarloTesting.h" #include "MonteCarloTesting.h"
using Mantid::Algorithms::MCAbsorptionStrategy; using Mantid::Algorithms::MCAbsorptionStrategy;
...@@ -64,8 +65,10 @@ private: ...@@ -64,8 +65,10 @@ private:
class MockBeamProfile final : public Mantid::Algorithms::IBeamProfile { class MockBeamProfile final : public Mantid::Algorithms::IBeamProfile {
public: public:
using Mantid::Algorithms::IBeamProfile::Ray; using Mantid::Algorithms::IBeamProfile::Ray;
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD1(generatePoint, MOCK_CONST_METHOD1(generatePoint,
Ray(Mantid::Kernel::PseudoRandomNumberGenerator &)); Ray(Mantid::Kernel::PseudoRandomNumberGenerator &));
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
MCAbsorptionStrategy createTestObject() { MCAbsorptionStrategy createTestObject() {
......
...@@ -7,12 +7,13 @@ ...@@ -7,12 +7,13 @@
#include "MantidAlgorithms/MaxEnt/MaxentCalculator.h" #include "MantidAlgorithms/MaxEnt/MaxentCalculator.h"
#include "MantidAlgorithms/MaxEnt/MaxentEntropy.h" #include "MantidAlgorithms/MaxEnt/MaxentEntropy.h"
#include "MantidAlgorithms/MaxEnt/MaxentTransform.h" #include "MantidAlgorithms/MaxEnt/MaxentTransform.h"
#include "MantidKernel/WarningSuppressions.h"
using namespace Mantid::Algorithms; using namespace Mantid::Algorithms;
using namespace testing; using namespace testing;
class MockEntropy : public MaxentEntropy { class MockEntropy : public MaxentEntropy {
GCC_DIAG_OFF_SUGGEST_OVERRIDE
public: public:
MOCK_METHOD2(derivative, MOCK_METHOD2(derivative,
std::vector<double>(const std::vector<double> &, double)); std::vector<double>(const std::vector<double> &, double));
...@@ -28,7 +29,7 @@ public: ...@@ -28,7 +29,7 @@ public:
MOCK_METHOD1(imageToData, std::vector<double>(const std::vector<double> &)); MOCK_METHOD1(imageToData, std::vector<double>(const std::vector<double> &));
MOCK_METHOD1(dataToImage, std::vector<double>(const std::vector<double> &)); MOCK_METHOD1(dataToImage, std::vector<double>(const std::vector<double> &));
}; };
GCC_DIAG_ON_SUGGEST_OVERRIDE
using MockEntropy_sptr = std::shared_ptr<MockEntropy>; using MockEntropy_sptr = std::shared_ptr<MockEntropy>;
class MaxentCalculatorTest : public CxxTest::TestSuite { class MaxentCalculatorTest : public CxxTest::TestSuite {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "MantidGeometry/Objects/ShapeFactory.h" #include "MantidGeometry/Objects/ShapeFactory.h"
#include "MantidKernel/Material.h" #include "MantidKernel/Material.h"
#include "MantidKernel/PseudoRandomNumberGenerator.h" #include "MantidKernel/PseudoRandomNumberGenerator.h"
#include "MantidKernel/WarningSuppressions.h"
#include "MantidTestHelpers/ComponentCreationHelper.h" #include "MantidTestHelpers/ComponentCreationHelper.h"
#include <gmock/gmock.h> #include <gmock/gmock.h>
...@@ -22,6 +23,7 @@ namespace MonteCarloTesting { ...@@ -22,6 +23,7 @@ namespace MonteCarloTesting {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
class MockRNG final : public Mantid::Kernel::PseudoRandomNumberGenerator { class MockRNG final : public Mantid::Kernel::PseudoRandomNumberGenerator {
public: public:
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_METHOD0(nextValue, double()); MOCK_METHOD0(nextValue, double());
MOCK_METHOD2(nextValue, double(double, double)); MOCK_METHOD2(nextValue, double(double, double));
MOCK_METHOD2(nextInt, int(int, int)); MOCK_METHOD2(nextInt, int(int, int));
...@@ -30,6 +32,7 @@ public: ...@@ -30,6 +32,7 @@ public:
MOCK_METHOD0(restore, void()); MOCK_METHOD0(restore, void());
MOCK_METHOD1(setSeed, void(size_t)); MOCK_METHOD1(setSeed, void(size_t));
MOCK_METHOD2(setRange, void(const double, const double)); MOCK_METHOD2(setRange, void(const double, const double));
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
#ifndef MANTID_DATAOBJECTS_MDBOXITERATORTEST_H_ #ifndef MANTID_DATAOBJECTS_MDBOXITERATORTEST_H_
#define MANTID_DATAOBJECTS_MDBOXITERATORTEST_H_ #define MANTID_DATAOBJECTS_MDBOXITERATORTEST_H_
#include "MantidDataObjects/MDBox.h"
#include "MantidDataObjects/MDBoxIterator.h"
#include "MantidDataObjects/MDEventFactory.h"
#include "MantidDataObjects/MDGridBox.h"
#include "MantidGeometry/MDGeometry/MDBoxImplicitFunction.h" #include "MantidGeometry/MDGeometry/MDBoxImplicitFunction.h"
#include "MantidGeometry/MDGeometry/MDImplicitFunction.h" #include "MantidGeometry/MDGeometry/MDImplicitFunction.h"
#include "MantidGeometry/MDGeometry/MDPlane.h" #include "MantidGeometry/MDGeometry/MDPlane.h"
#include "MantidKernel/System.h" #include "MantidKernel/System.h"
#include "MantidKernel/Timer.h" #include "MantidKernel/Timer.h"
#include "MantidDataObjects/MDBoxIterator.h" #include "MantidKernel/WarningSuppressions.h"
#include "MantidDataObjects/MDEventFactory.h"
#include "MantidDataObjects/MDGridBox.h"
#include "MantidDataObjects/MDBox.h"
#include "MantidTestHelpers/MDEventsTestHelper.h" #include "MantidTestHelpers/MDEventsTestHelper.h"
#include <boost/math/special_functions/fpclassify.hpp>
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include <boost/math/special_functions/fpclassify.hpp>
using namespace Mantid::DataObjects; using namespace Mantid::DataObjects;
using namespace Mantid::API; using namespace Mantid::API;
...@@ -492,7 +493,9 @@ public: ...@@ -492,7 +493,9 @@ public:
pBC(MDBox<MDLeanEvent<2>, 2>::getBoxController()) pBC(MDBox<MDLeanEvent<2>, 2>::getBoxController())
{} {}
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(getIsMasked, bool()); MOCK_CONST_METHOD0(getIsMasked, bool());
GCC_DIAG_ON_SUGGEST_OVERRIDE
~MockMDBox() override { delete pBC; } ~MockMDBox() override { delete pBC; }
}; };
...@@ -568,8 +571,10 @@ public: ...@@ -568,8 +571,10 @@ public:
/// Mock Skipping Policy Type to inject. /// Mock Skipping Policy Type to inject.
class MockSkippingPolicy : public SkippingPolicy { class MockSkippingPolicy : public SkippingPolicy {
public: public:
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(keepGoing, bool()); MOCK_CONST_METHOD0(keepGoing, bool());
MOCK_METHOD0(Die, void()); MOCK_METHOD0(Die, void());
GCC_DIAG_ON_SUGGEST_OVERRIDE
~MockSkippingPolicy() override { Die(); } ~MockSkippingPolicy() override { Die(); }
}; };
......
#ifndef MDGRIDBOXTEST_H #ifndef MDGRIDBOXTEST_H
#define MDGRIDBOXTEST_H #define MDGRIDBOXTEST_H
#include "MDBoxTest.h"
#include "MantidAPI/BoxController.h"
#include "MantidDataObjects/CoordTransformDistance.h"
#include "MantidDataObjects/MDBox.h"
#include "MantidDataObjects/MDGridBox.h"
#include "MantidDataObjects/MDLeanEvent.h"
#include "MantidGeometry/MDGeometry/MDBoxImplicitFunction.h" #include "MantidGeometry/MDGeometry/MDBoxImplicitFunction.h"
#include "MantidGeometry/MDGeometry/MDImplicitFunction.h" #include "MantidGeometry/MDGeometry/MDImplicitFunction.h"
#include "MantidKernel/ConfigService.h"
#include "MantidKernel/CPUTimer.h" #include "MantidKernel/CPUTimer.h"
#include "MantidKernel/ConfigService.h"
#include "MantidKernel/Memory.h" #include "MantidKernel/Memory.h"
#include "MantidKernel/MultiThreaded.h" #include "MantidKernel/MultiThreaded.h"
#include "MantidKernel/ProgressText.h" #include "MantidKernel/ProgressText.h"
...@@ -12,14 +18,9 @@ ...@@ -12,14 +18,9 @@
#include "MantidKernel/ThreadScheduler.h" #include "MantidKernel/ThreadScheduler.h"
#include "MantidKernel/Timer.h" #include "MantidKernel/Timer.h"
#include "MantidKernel/Utils.h" #include "MantidKernel/Utils.h"
#include "MantidAPI/BoxController.h" #include "MantidKernel/WarningSuppressions.h"
#include "MantidDataObjects/CoordTransformDistance.h"
#include "MantidDataObjects/MDBox.h"
#include "MantidDataObjects/MDLeanEvent.h"
#include "MantidDataObjects/MDGridBox.h"
#include <nexus/NeXusFile.hpp>
#include "MantidTestHelpers/MDEventsTestHelper.h" #include "MantidTestHelpers/MDEventsTestHelper.h"
#include "MDBoxTest.h" #include <Poco/File.h>
#include <boost/random/linear_congruential.hpp> #include <boost/random/linear_congruential.hpp>
#include <boost/random/mersenne_twister.hpp> #include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int.hpp> #include <boost/random/uniform_int.hpp>
...@@ -27,11 +28,11 @@ ...@@ -27,11 +28,11 @@
#include <boost/random/variate_generator.hpp> #include <boost/random/variate_generator.hpp>
#include <cmath> #include <cmath>
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include <gmock/gmock.h>
#include <map> #include <map>
#include <memory> #include <memory>
#include <Poco/File.h> #include <nexus/NeXusFile.hpp>
#include <vector> #include <vector>
#include <gmock/gmock.h>
using namespace Mantid; using namespace Mantid;
using namespace Mantid::Kernel; using namespace Mantid::Kernel;
...@@ -50,10 +51,12 @@ private: ...@@ -50,10 +51,12 @@ private:
MockMDBox() MockMDBox()
: MDBox<MDLeanEvent<1>, 1>(new API::BoxController(1)), : MDBox<MDLeanEvent<1>, 1>(new API::BoxController(1)),
pBC(MDBox<MDLeanEvent<1>, 1>::getBoxController()) {} pBC(MDBox<MDLeanEvent<1>, 1>::getBoxController()) {}
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(getIsMasked, bool()); MOCK_CONST_METHOD0(getIsMasked, bool());
MOCK_METHOD0(mask, void()); MOCK_METHOD0(mask, void());
MOCK_METHOD0(unmask, void()); MOCK_METHOD0(unmask, void());
~MockMDBox() override { delete pBC; } ~MockMDBox() override { delete pBC; }
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
// the sp to a box controller used as general reference to all tested // the sp to a box controller used as general reference to all tested
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
namespace Mantid { namespace Mantid {
namespace DataObjects { namespace DataObjects {
GCC_DIAG_OFF_SUGGEST_OVERRIDE
class MockPeakShapeFactory : public PeakShapeFactory { class MockPeakShapeFactory : public PeakShapeFactory {
public: public:
MOCK_CONST_METHOD1(create, MOCK_CONST_METHOD1(create,
...@@ -20,8 +22,6 @@ public: ...@@ -20,8 +22,6 @@ public:
~MockPeakShapeFactory() override {} ~MockPeakShapeFactory() override {}
}; };
GCC_DIAG_OFF_SUGGEST_OVERRIDE
class MockPeakShape : public Mantid::Geometry::PeakShape { class MockPeakShape : public Mantid::Geometry::PeakShape {
public: public:
MOCK_CONST_METHOD0(frame, Mantid::Kernel::SpecialCoordinateSystem()); MOCK_CONST_METHOD0(frame, Mantid::Kernel::SpecialCoordinateSystem());
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include "MantidGeometry/Crystal/SpaceGroupFactory.h" #include "MantidGeometry/Crystal/SpaceGroupFactory.h"
#include "MantidGeometry/Crystal/StructureFactorCalculator.h" #include "MantidGeometry/Crystal/StructureFactorCalculator.h"
#include "MantidKernel/WarningSuppressions.h"
#include <strstream> #include <strstream>
using namespace Mantid::Geometry; using namespace Mantid::Geometry;
...@@ -134,7 +136,7 @@ public: ...@@ -134,7 +136,7 @@ public:
TS_ASSERT(Mock::VerifyAndClearExpectations(mock.get())) TS_ASSERT(Mock::VerifyAndClearExpectations(mock.get()))
} }
GCC_DIAG_OFF_SUGGEST_OVERRIDE
private: private:
class MockStructureFactorCalculator : public StructureFactorCalculator { class MockStructureFactorCalculator : public StructureFactorCalculator {
public: public:
...@@ -142,5 +144,5 @@ private: ...@@ -142,5 +144,5 @@ private:
MOCK_CONST_METHOD1(getFSquared, double(const V3D &)); MOCK_CONST_METHOD1(getFSquared, double(const V3D &));
}; };
}; };
GCC_DIAG_ON_SUGGEST_OVERRIDE
#endif /* MANTID_GEOMETRY_BASICHKLFILTERSTEST_H_ */ #endif /* MANTID_GEOMETRY_BASICHKLFILTERSTEST_H_ */
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include "MantidGeometry/Crystal/BraggScattererFactory.h" #include "MantidGeometry/Crystal/BraggScattererFactory.h"
#include "MantidKernel/WarningSuppressions.h"
using namespace Mantid::Geometry; using namespace Mantid::Geometry;
using namespace Mantid::Kernel; using namespace Mantid::Kernel;
...@@ -56,9 +56,10 @@ private: ...@@ -56,9 +56,10 @@ private:
~MockScatterer() override {} ~MockScatterer() override {}
std::string name() const override { return "MockScatterer"; } std::string name() const override { return "MockScatterer"; }
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(clone, BraggScatterer_sptr()); MOCK_CONST_METHOD0(clone, BraggScatterer_sptr());
MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &)); MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &));
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
}; };
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "MantidGeometry/Crystal/BraggScattererInCrystalStructure.h" #include "MantidGeometry/Crystal/BraggScattererInCrystalStructure.h"
#include "MantidGeometry/Crystal/SpaceGroupFactory.h" #include "MantidGeometry/Crystal/SpaceGroupFactory.h"
#include "MantidKernel/WarningSuppressions.h"
using namespace Mantid::Geometry; using namespace Mantid::Geometry;
using namespace Mantid::Kernel; using namespace Mantid::Kernel;
...@@ -111,11 +112,12 @@ private: ...@@ -111,11 +112,12 @@ private:
public: public:
MockBraggScatterer() : BraggScattererInCrystalStructure() {} MockBraggScatterer() : BraggScattererInCrystalStructure() {}
~MockBraggScatterer() override {} ~MockBraggScatterer() override {}
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(name, std::string()); MOCK_CONST_METHOD0(name, std::string());
MOCK_CONST_METHOD0(clone, BraggScatterer_sptr()); MOCK_CONST_METHOD0(clone, BraggScatterer_sptr());
MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &)); MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &));
MOCK_METHOD1(afterScattererPropertySet, void(const std::string &)); MOCK_METHOD1(afterScattererPropertySet, void(const std::string &));
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
}; };
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include "MantidGeometry/Crystal/BraggScatterer.h" #include "MantidGeometry/Crystal/BraggScatterer.h"
#include "MantidKernel/WarningSuppressions.h"
using namespace Mantid::Geometry; using namespace Mantid::Geometry;
using namespace Mantid::Kernel; using namespace Mantid::Kernel;
...@@ -42,13 +43,12 @@ private: ...@@ -42,13 +43,12 @@ private:
class MockBraggScatterer : public BraggScatterer { class MockBraggScatterer : public BraggScatterer {
public: public:
MockBraggScatterer() : BraggScatterer() {} GCC_DIAG_OFF_SUGGEST_OVERRIDE
~MockBraggScatterer() override {}
MOCK_CONST_METHOD0(name, std::string()); MOCK_CONST_METHOD0(name, std::string());
MOCK_CONST_METHOD0(clone, BraggScatterer_sptr()); MOCK_CONST_METHOD0(clone, BraggScatterer_sptr());
MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &)); MOCK_CONST_METHOD1(calculateStructureFactor, StructureFactor(const V3D &));
MOCK_METHOD1(afterScattererPropertySet, void(const std::string &)); MOCK_METHOD1(afterScattererPropertySet, void(const std::string &));
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
}; };
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <typeinfo> #include <typeinfo>
#include "MantidGeometry/MDGeometry/CompositeImplicitFunction.h" #include "MantidGeometry/MDGeometry/CompositeImplicitFunction.h"
#include "MantidKernel/WarningSuppresssions.h"
using namespace Mantid::Geometry; using namespace Mantid::Geometry;
...@@ -17,9 +18,11 @@ private: ...@@ -17,9 +18,11 @@ private:
// composite. // composite.
class MockImplicitFunction : public Mantid::Geometry::MDImplicitFunction { class MockImplicitFunction : public Mantid::Geometry::MDImplicitFunction {
public: public:
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(toXMLString, std::string()); MOCK_CONST_METHOD0(toXMLString, std::string());
MOCK_CONST_METHOD0(getName, std::string()); MOCK_CONST_METHOD0(getName, std::string());
MOCK_METHOD1(isPointContained, bool(const Mantid::coord_t *coords)); MOCK_METHOD1(isPointContained, bool(const Mantid::coord_t *coords));
GCC_DIAG_ON_SUGGEST_OVERRIDE
bool isPointContained(const std::vector<Mantid::coord_t> &) override { bool isPointContained(const std::vector<Mantid::coord_t> &) override {
return true; return true;
} }
......
#ifndef MANTID_GEOMETRY_INSTRUMENTDEFINITIONPARSERTEST_H_ #ifndef MANTID_GEOMETRY_INSTRUMENTDEFINITIONPARSERTEST_H_
#define MANTID_GEOMETRY_INSTRUMENTDEFINITIONPARSERTEST_H_ #define MANTID_GEOMETRY_INSTRUMENTDEFINITIONPARSERTEST_H_
#include <cxxtest/TestSuite.h>
#include "MantidGeometry/Instrument/InstrumentDefinitionParser.h" #include "MantidGeometry/Instrument/InstrumentDefinitionParser.h"
#include "MantidGeometry/Instrument/RectangularDetector.h"
#include "MantidGeometry/Instrument/ReferenceFrame.h"
#include "MantidKernel/ChecksumHelper.h" #include "MantidKernel/ChecksumHelper.h"
#include "MantidKernel/ConfigService.h" #include "MantidKernel/ConfigService.h"
#include "MantidKernel/Exception.h" #include "MantidKernel/Exception.h"
#include "MantidKernel/Strings.h" #include "MantidKernel/Strings.h"
#include "MantidGeometry/Instrument/RectangularDetector.h" #include "MantidKernel/WarningSuppressions.h"
#include "MantidGeometry/Instrument/ReferenceFrame.h"
#include "MantidTestHelpers/ScopedFileHelper.h" #include "MantidTestHelpers/ScopedFileHelper.h"
#include <cxxtest/TestSuite.h>
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
...@@ -21,7 +22,7 @@ using namespace testing; ...@@ -21,7 +22,7 @@ using namespace testing;
using ScopedFileHelper::ScopedFile; using ScopedFileHelper::ScopedFile;
class InstrumentDefinitionParserTest : public CxxTest::TestSuite { class InstrumentDefinitionParserTest : public CxxTest::TestSuite {
GCC_DIAG_OFF_SUGGEST_OVERRIDE
private: private:
/// Mock Type to act as IDF files. /// Mock Type to act as IDF files.
class MockIDFObject : public Mantid::Geometry::IDFObject { class MockIDFObject : public Mantid::Geometry::IDFObject {
...@@ -39,7 +40,7 @@ private: ...@@ -39,7 +40,7 @@ private:
MOCK_CONST_METHOD0(exists, bool()); MOCK_CONST_METHOD0(exists, bool());
MOCK_CONST_METHOD0(getParentDirectory, const Poco::Path()); MOCK_CONST_METHOD0(getParentDirectory, const Poco::Path());
}; };
GCC_DIAG_ON_SUGGEST_OVERRIDE
/** /**
Helper type to pass around related IDF environment information in a Helper type to pass around related IDF environment information in a
collection. collection.
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "MantidGeometry/MDGeometry/IMDDimension.h" #include "MantidGeometry/MDGeometry/IMDDimension.h"
#include "MantidKernel/UnitLabel.h" #include "MantidKernel/UnitLabel.h"
#include "MantidKernel/WarningSuppressions.h"
#include <boost/functional/hash.hpp> #include <boost/functional/hash.hpp>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
...@@ -31,6 +32,7 @@ private: ...@@ -31,6 +32,7 @@ private:
/// dependency. /// dependency.
class MockIMDDimension : public Mantid::Geometry::IMDDimension { class MockIMDDimension : public Mantid::Geometry::IMDDimension {
public: public:
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(getName, std::string()); MOCK_CONST_METHOD0(getName, std::string());
MOCK_CONST_METHOD0(getUnits, const Mantid::Kernel::UnitLabel()); MOCK_CONST_METHOD0(getUnits, const Mantid::Kernel::UnitLabel());
MOCK_CONST_METHOD0(getDimensionId, std::string()); MOCK_CONST_METHOD0(getDimensionId, std::string());
...@@ -43,6 +45,7 @@ private: ...@@ -43,6 +45,7 @@ private:
MOCK_METHOD3(setRange, void(size_t nBins, coord_t min, coord_t max)); MOCK_METHOD3(setRange, void(size_t nBins, coord_t min, coord_t max));
MOCK_CONST_METHOD0(getMDUnits, const Kernel::MDUnit &()); MOCK_CONST_METHOD0(getMDUnits, const Kernel::MDUnit &());
MOCK_CONST_METHOD0(getMDFrame, const Geometry::MDFrame &()); MOCK_CONST_METHOD0(getMDFrame, const Geometry::MDFrame &());
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
static std::string createDimensionXMLString(unsigned int nbins, int min, static std::string createDimensionXMLString(unsigned int nbins, int min,
......
#ifndef MANTIDAPI_PEAKTRANSFORMSELECTOR_TEST_H_ #ifndef MANTIDAPI_PEAKTRANSFORMSELECTOR_TEST_H_
#define MANTIDAPI_PEAKTRANSFORMSELECTOR_TEST_H_ #define MANTIDAPI_PEAKTRANSFORMSELECTOR_TEST_H_
#include <cxxtest/TestSuite.h>
#include "MantidGeometry/Crystal/PeakTransform.h" #include "MantidGeometry/Crystal/PeakTransform.h"
#include "MantidGeometry/Crystal/PeakTransformSelector.h" #include "MantidGeometry/Crystal/PeakTransformSelector.h"
#include "MantidKernel/WarningSuppressions.h"
#include "MockObjects.h" #include "MockObjects.h"
#include <cxxtest/TestSuite.h>
using namespace Mantid::Geometry; using namespace Mantid::Geometry;
using namespace Mantid; using namespace Mantid;
...@@ -22,10 +23,12 @@ private: ...@@ -22,10 +23,12 @@ private:
enum { value = I }; enum { value = I };
public: public:
GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(createDefaultTransform, PeakTransform_sptr()); MOCK_CONST_METHOD0(createDefaultTransform, PeakTransform_sptr());
MOCK_CONST_METHOD2(createTransform, MOCK_CONST_METHOD2(createTransform,
PeakTransform_sptr(const std::string &, PeakTransform_sptr(const std::string &,
const std::string &)); const std::string &));
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
typedef MockPeakTransformFactoryType<0> MockPeakTransformFactory; typedef MockPeakTransformFactoryType<0> MockPeakTransformFactory;
......
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
using ::testing::Return; using ::testing::Return;
#include "MantidGeometry/Crystal/SpaceGroupFactory.h"
#include "MantidGeometry/Crystal/PointGroupFactory.h"
#include "MantidGeometry/Crystal/CyclicGroup.h" #include "MantidGeometry/Crystal/CyclicGroup.h"
#include "MantidGeometry/Crystal/PointGroupFactory.h"
#include "MantidGeometry/Crystal/SpaceGroupFactory.h"
#include "MantidKernel/WarningSuppresssions.h"
using namespace Mantid::Geometry; using namespace Mantid::Geometry;
using Mantid::Kernel::V3D; using Mantid::Kernel::V3D;
...@@ -397,9 +398,9 @@ private: ...@@ -397,9 +398,9 @@ private:
MockSpaceGroupGenerator(size_t number, const std::string &hmSymbol, MockSpaceGroupGenerator(size_t number, const std::string &hmSymbol,
const std::string &generatorInformation) const std::string &generatorInformation)
: AbstractSpaceGroupGenerator(number, hmSymbol, generatorInformation) {} : AbstractSpaceGroupGenerator(number, hmSymbol, generatorInformation) {}
~MockSpaceGroupGenerator() override {} GCC_DIAG_OFF_SUGGEST_OVERRIDE
MOCK_CONST_METHOD0(generateGroup, Group_const_sptr()); MOCK_CONST_METHOD0(generateGroup, Group_const_sptr());
GCC_DIAG_ON_SUGGEST_OVERRIDE
}; };
/* Testing TransformationSpaceGroupGenerator is a bit hard in the sense that /* Testing TransformationSpaceGroupGenerator is a bit hard in the sense that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment