diff --git a/Framework/Algorithms/test/RebinByTimeBaseTest.h b/Framework/Algorithms/test/RebinByTimeBaseTest.h index a4e499895176fcb8f7e8bcd741832d5acdce95db..a93ac7133c1aa39e989d15c71c1e36457d9c49f6 100644 --- a/Framework/Algorithms/test/RebinByTimeBaseTest.h +++ b/Framework/Algorithms/test/RebinByTimeBaseTest.h @@ -68,6 +68,9 @@ createEventWorkspace(const int numberspectra, const int nDistrubutedEvents, return retVal; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + /* This type is an IEventWorkspace, but not an EventWorkspace. */ @@ -104,6 +107,8 @@ private: } }; } + +#pragma gcc diagnostic pop //===================================================================================== // Functional Tests //===================================================================================== diff --git a/Framework/Crystal/test/MockObjects.h b/Framework/Crystal/test/MockObjects.h index 0a4217f1ca7add8b7e8ec1d54e555cebed0e350c..17813b5b46719d334059d559dc8dc1d470a8fef4 100644 --- a/Framework/Crystal/test/MockObjects.h +++ b/Framework/Crystal/test/MockObjects.h @@ -16,6 +16,9 @@ namespace Mantid { namespace Crystal { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + // Mock Background strategy class MockBackgroundStrategy : public BackgroundStrategy { public: @@ -45,6 +48,8 @@ public: return this->getLabel() == label; } }; + +#pragma GCC diagnostic pop } } diff --git a/Framework/Crystal/test/PeakBackgroundTest.h b/Framework/Crystal/test/PeakBackgroundTest.h index 4c5fb2dfb8cf6b8aa1321607e1473fb5a1f3b252..b1111ec4389df26a5949993bf4775426388c8f65 100644 --- a/Framework/Crystal/test/PeakBackgroundTest.h +++ b/Framework/Crystal/test/PeakBackgroundTest.h @@ -32,6 +32,9 @@ IPeaksWorkspace_sptr make_peaks_workspace(const V3D &hklPeak) { return peakWS; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + // Mock Background strategy class MockIMDIterator : public IMDIterator { public: @@ -158,4 +161,6 @@ public: } }; +#pragma GCC diagnostic pop + #endif /* MANTID_CRYSTAL_PEAKBACKGROUNDTEST_H_ */ diff --git a/Framework/DataHandling/test/CMakeLists.txt b/Framework/DataHandling/test/CMakeLists.txt index dad857f2033b5d902d3e4e3f044a1af7063721e0..bef764ad20f3145d164a204d2b75992c114aa55f 100644 --- a/Framework/DataHandling/test/CMakeLists.txt +++ b/Framework/DataHandling/test/CMakeLists.txt @@ -1,5 +1,5 @@ if ( CXXTEST_FOUND ) - include_directories ( SYSTEM ${CXXTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} ) + include_directories ( SYSTEM ${CXXTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR}) include_directories ( ../../TestHelpers/inc ) # This variable is used within the cxxtest_add_test macro to build this helper class into the test executable. @@ -14,6 +14,7 @@ if ( CXXTEST_FOUND ) ) cxxtest_add_test ( DataHandlingTest ${TEST_FILES} ) + target_include_directories( DataHandlingTest SYSTEM PRIVATE ${HDF5_INCLUDE_DIRS} ) target_link_libraries( DataHandlingTest LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} API DataHandling diff --git a/Framework/DataObjects/test/MockObjects.h b/Framework/DataObjects/test/MockObjects.h index 9e60b097f6c73e690bda242281758bdbfc3b5bb1..88aa562a9f4b52231c7b132b9b3e905e56235882 100644 --- a/Framework/DataObjects/test/MockObjects.h +++ b/Framework/DataObjects/test/MockObjects.h @@ -19,6 +19,9 @@ public: ~MockPeakShapeFactory() override {} }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockPeakShape : public Mantid::Geometry::PeakShape { public: MOCK_CONST_METHOD0(frame, Mantid::Kernel::SpecialCoordinateSystem()); @@ -34,4 +37,6 @@ public: } } +#pragma GCC diagnostic pop + #endif /* MOCKOBJECTS_H_ */ diff --git a/Framework/Geometry/test/MockObjects.h b/Framework/Geometry/test/MockObjects.h index 473bd91e3ce4901f9ae75497d6b85bd621f58a9c..c530db2b0c668a76f8f3105420f7b66aba732e0a 100644 --- a/Framework/Geometry/test/MockObjects.h +++ b/Framework/Geometry/test/MockObjects.h @@ -21,6 +21,9 @@ using boost::regex; namespace { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + /*------------------------------------------------------------ Mock Peak Transform ------------------------------------------------------------*/ @@ -109,4 +112,6 @@ public: MOCK_CONST_METHOD0(getPeakShape, const Mantid::Geometry::PeakShape &()); }; } + +#pragma GCC diagnostic pop #endif /* MANTIDGEOMETRYTEST_MOCKOBJECTS_H_ */ diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h index 92d1323c28351dac3dd4d2e70b7603ac149cc6b0..f581c005189d7f4a9b598694b0256b63bdaa53fa 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h @@ -35,6 +35,9 @@ using namespace Geometry; typedef std::pair<double, double> DoublePair; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockDetector : public PoldiAbstractDetector { protected: std::vector<int> m_availableElements; @@ -388,6 +391,8 @@ public: } }; +#pragma GCC diagnostic pop + class PoldiPeakCollectionHelpers { /* This class contains some static helper function to create * peak collections and related components for testing purposes. diff --git a/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h b/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h index 6a0e873e303eefa043cf250cc072c9761e08cf73..a00dc544343528a8bc590469127186a84f0026fe 100644 --- a/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h +++ b/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h @@ -21,6 +21,9 @@ using namespace Mantid::Kernel; using ::testing::_; using ::testing::Mock; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockPawleyFunction : public IPawleyFunction { public: MockPawleyFunction() {} @@ -188,4 +191,6 @@ private: PoldiInstrumentAdapter_sptr m_instrument; }; +#pragma GCC diagnostic pop + #endif /* MANTID_SINQ_POLDISPECTRUMPAWLEYFUNCTIONTEST_H_ */ diff --git a/MantidQt/API/test/SignalRangeTest.h b/MantidQt/API/test/SignalRangeTest.h index 9beaf50bc2af9e1c68f928b7726e96885ccd305f..2cad8ac81d0360165ae5c30b3accf9260ee5e553 100644 --- a/MantidQt/API/test/SignalRangeTest.h +++ b/MantidQt/API/test/SignalRangeTest.h @@ -10,6 +10,9 @@ #include "MantidAPI/IMDIterator.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class SignalRangeTest : public CxxTest::TestSuite { private: class MockMDWorkspace : public Mantid::API::IMDWorkspace { @@ -199,5 +202,5 @@ public: TS_ASSERT_DELTA(5.0, range.maxValue(), 1e-10); } }; - +#pragma GCC diagnostic pop #endif /* MANTIDQT_API_SIGNALRANGETEST */ diff --git a/MantidQt/CustomInterfaces/test/ALCBaselineModellingPresenterTest.h b/MantidQt/CustomInterfaces/test/ALCBaselineModellingPresenterTest.h index 4e0f8d09b5f6cc4147ce45a44a2548ff1fc24f12..c2605b3453016f06f50d3a1b54fa8b64fd811a40 100644 --- a/MantidQt/CustomInterfaces/test/ALCBaselineModellingPresenterTest.h +++ b/MantidQt/CustomInterfaces/test/ALCBaselineModellingPresenterTest.h @@ -17,6 +17,9 @@ using namespace MantidQt::CustomInterfaces; using namespace testing; using boost::scoped_ptr; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockALCBaselineModellingView : public IALCBaselineModellingView { public: void requestFit() { emit fitRequested(); } @@ -361,5 +364,5 @@ public: m_view->help(); } }; - +#pragma GCC diagnostic pop #endif /* MANTIDQT_CUSTOMINTERFACES_ALCBASELINEMODELLINGTEST_H_ */ diff --git a/MantidQt/CustomInterfaces/test/ALCDataLoadingPresenterTest.h b/MantidQt/CustomInterfaces/test/ALCDataLoadingPresenterTest.h index 8dfda5b8aad765843607d3e4b3632690b6959e8d..98161259f6c88dee8ffbf4d1da88d287c94a4124 100644 --- a/MantidQt/CustomInterfaces/test/ALCDataLoadingPresenterTest.h +++ b/MantidQt/CustomInterfaces/test/ALCDataLoadingPresenterTest.h @@ -24,6 +24,9 @@ operator<<(std::basic_ostream<CharType, CharTrait> &out, } } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockALCDataLoadingView : public IALCDataLoadingView { // XXX: A workaround, needed because of the way the comma is treated in a // macro @@ -365,4 +368,6 @@ public: } }; +#pragma GCC diagnostic pop + #endif /* MANTID_CUSTOMINTERFACES_ALCDATALOADINGTEST_H_ */ diff --git a/MantidQt/CustomInterfaces/test/EnggDiffractionViewMock.h b/MantidQt/CustomInterfaces/test/EnggDiffractionViewMock.h index 1f954b4b082fffcd9605481ec0b03ff5403a7cdd..9d318521c4d1a6ee0e61c4b7bc433ae484fbbcde 100644 --- a/MantidQt/CustomInterfaces/test/EnggDiffractionViewMock.h +++ b/MantidQt/CustomInterfaces/test/EnggDiffractionViewMock.h @@ -5,6 +5,9 @@ #include <gmock/gmock.h> +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + // This is a simple mock for the tomo interface view when using SCARF. class MockEnggDiffractionView : public MantidQt::CustomInterfaces::IEnggDiffractionView { @@ -235,5 +238,5 @@ public: // virtual void plotCalibOutput(); MOCK_METHOD1(plotCalibOutput, void(const std::string &pyCode)); }; - +#pragma GCC diagnostic pop #endif // MANTID_CUSTOMINTERFACES_ENGGDIFFRACTIONVIEWMOCK_H diff --git a/MantidQt/CustomInterfaces/test/ImageROIViewMock.h b/MantidQt/CustomInterfaces/test/ImageROIViewMock.h index a9ec2b431f2ce17ef305fc88093e3d249ebfdf0f..631680350b8d65fdd37fbfe03eb1c068b6638fca 100644 --- a/MantidQt/CustomInterfaces/test/ImageROIViewMock.h +++ b/MantidQt/CustomInterfaces/test/ImageROIViewMock.h @@ -5,6 +5,9 @@ #include <gmock/gmock.h> +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockImageROIView : public MantidQt::CustomInterfaces::IImageROIView { public: // void initParams(ImageStackPreParams ¶ms) @@ -104,4 +107,6 @@ public: MOCK_METHOD0(resetWidgetsOnNewStack, void()); }; +#pragma GCC diagnostic pop + #endif // MANTID_CUSTOMINTERFACES_IMAGEROIVIEWMOCK_H diff --git a/MantidQt/CustomInterfaces/test/ReflMainViewMockObjects.h b/MantidQt/CustomInterfaces/test/ReflMainViewMockObjects.h index 573c66d01d1c66f05d47c4c166208bbb55cbc2ab..85db977dd9fac630e94ff959b24f866b59fbf251 100644 --- a/MantidQt/CustomInterfaces/test/ReflMainViewMockObjects.h +++ b/MantidQt/CustomInterfaces/test/ReflMainViewMockObjects.h @@ -11,6 +11,9 @@ using namespace MantidQt::CustomInterfaces; using namespace Mantid::API; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockView : public ReflMainView { public: MockView(){}; @@ -85,5 +88,5 @@ public: MOCK_CONST_METHOD1(transformArchivePath, std::string(const std::string &)); ~MockICatalogInfo() override {} }; - +#pragma GCC diagnostic pop #endif /*MANTID_CUSTOMINTERFACES_REFLMAINVIEWMOCKOBJECTS_H*/ diff --git a/MantidQt/CustomInterfaces/test/TomographyViewMock.h b/MantidQt/CustomInterfaces/test/TomographyViewMock.h index fd33f5a01cae8b91cb58c65c47176d580554797e..be077d65df303accf2c6c7b7ff3f7dfd18264e83 100644 --- a/MantidQt/CustomInterfaces/test/TomographyViewMock.h +++ b/MantidQt/CustomInterfaces/test/TomographyViewMock.h @@ -5,6 +5,9 @@ #include <gmock/gmock.h> +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + // This is a simple mock for the tomo interface view when using SCARF. class MockTomographyIfaceView : public MantidQt::CustomInterfaces::ITomographyIfaceView { @@ -132,5 +135,5 @@ public: // virtual void runAggregateBands(Mantid::API::IAlgorithm_sptr alg) MOCK_METHOD1(runAggregateBands, void(Mantid::API::IAlgorithm_sptr alg)); }; - +#pragma GCC diagnostic pop #endif // MANTID_CUSTOMINTERFACES_TOMOGRAPHYIFACEVIEWMOCK_H diff --git a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DataProcessorUI/DataProcessorMockObjects.h b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DataProcessorUI/DataProcessorMockObjects.h index 16ade5f9e267e57ebe2a48c71296d6c2f0a19515..d4109cc6d68c0da6bc3728f93deb8abd5224c4b4 100644 --- a/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DataProcessorUI/DataProcessorMockObjects.h +++ b/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/DataProcessorUI/DataProcessorMockObjects.h @@ -21,6 +21,9 @@ const int ScaleCol = 6; const int GroupCol = 7; const int OptionsCol = 8; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockDataProcessorView : public DataProcessorView { public: MockDataProcessorView(){}; @@ -110,4 +113,5 @@ private: std::map<std::string, QVariant> m_options; }; +#pragma GCC diagnostic pop #endif /*MANTID_MANTIDWIDGETS_DATAPROCESSORVIEWMOCKOBJECTS_H*/ diff --git a/MantidQt/SliceViewer/test/MockObjects.h b/MantidQt/SliceViewer/test/MockObjects.h index ee19bc3ce5e8601df1a5efd88c21f8b1353b0b94..f96988fa45079d857a0f56bc2da06fddd91d94c8 100644 --- a/MantidQt/SliceViewer/test/MockObjects.h +++ b/MantidQt/SliceViewer/test/MockObjects.h @@ -23,8 +23,10 @@ using namespace Mantid::Geometry; using namespace Mantid; using boost::regex; -namespace { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" +namespace { /*------------------------------------------------------------ Zoomable Peaks View ------------------------------------------------------------*/ diff --git a/Vates/VatesAPI/test/MockObjects.h b/Vates/VatesAPI/test/MockObjects.h index a75356561760fa51bf090386320630773a9dc7d8..5409de39ec16bfc28a467dbfc18fd2e1d95028da 100644 --- a/Vates/VatesAPI/test/MockObjects.h +++ b/Vates/VatesAPI/test/MockObjects.h @@ -73,6 +73,9 @@ public: ~FakeIMDDimension() override {} }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + //================================================================================================= /// Concrete mocked implementation of IMDWorkspace for testing. class MockIMDWorkspace : public Mantid::API::IMDWorkspace { @@ -177,6 +180,8 @@ public: MOCK_METHOD1(eventRaised, void(double)); }; +#pragma GCC diagnostic pop + class FakeProgressAction : public Mantid::VATES::ProgressAction { void eventRaised(double) override {} }; diff --git a/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h b/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h index e589941eae66c0ab572a3c86992f92cb911659da..1cee1a91d4c7f5395d6305d4a29a616e526ddc50 100644 --- a/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h +++ b/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h @@ -23,6 +23,9 @@ using namespace ::testing; using namespace Mantid::VATES; using Mantid::VATES::vtkPeakMarkerFactory; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" + class MockPeakShape : public Peak { public: MOCK_CONST_METHOD0(getHKL, Mantid::Kernel::V3D(void)); @@ -310,5 +313,5 @@ public: } } }; - +#pragma GCC diagnostic pop #endif