Skip to content

Commit

Permalink
refs #5167. Mocks should now work under gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Aug 31, 2012
1 parent 93fabe8 commit 63553b4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
26 changes: 13 additions & 13 deletions Code/Mantid/MantidQt/SliceViewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
set ( SRC_FILES
src/ColorBarWidget.cpp
src/ConcretePeaksPresenter.cpp
src/ConcretePeaksPresenter.cpp
src/CustomTools.cpp
src/DimensionSliceWidget.cpp
src/LineOverlay.cpp
src/LineViewer.cpp
src/PeakOverlay.cpp
src/PeakOverlayFactory.cpp
src/PeakOverlayFactoryBase.cpp
src/PeakOverlay.cpp
src/PeakOverlayFactory.cpp
src/PeakOverlayFactoryBase.cpp
src/QScienceSpinBox.cpp
src/QwtRasterDataMD.cpp
src/SliceViewer.cpp
Expand All @@ -23,17 +23,17 @@ set ( INC_FILES
inc/MantidQtSliceViewer/ConcretePeaksPresenter.h
inc/MantidQtSliceViewer/CustomTools.h
inc/MantidQtSliceViewer/DimensionSliceWidget.h
inc/MantidQtSliceViewer/FirstExperimentInfoQuery.h
inc/MantidQtSliceViewer/FirstExperimentInfoQuery.h
inc/MantidQtSliceViewer/LineOverlay.h
inc/MantidQtSliceViewer/LinePlotOptions.h
inc/MantidQtSliceViewer/LineViewer.h
inc/MantidQtSliceViewer/NullPeaksPresenter.h
inc/MantidQtSliceViewer/PeakOverlay.h
inc/MantidQtSliceViewer/PeakOverlayView.h
inc/MantidQtSliceViewer/PeakOverlayViewFactory.h
inc/MantidQtSliceViewer/PeakOverlayFactory.h
inc/MantidQtSliceViewer/PeakOverlayFactoryBase.h
inc/MantidQtSliceViewer/PeaksPresenter.h
inc/MantidQtSliceViewer/PeakOverlay.h
inc/MantidQtSliceViewer/PeakOverlayView.h
inc/MantidQtSliceViewer/PeakOverlayViewFactory.h
inc/MantidQtSliceViewer/PeakOverlayFactory.h
inc/MantidQtSliceViewer/PeakOverlayFactoryBase.h
inc/MantidQtSliceViewer/PeaksPresenter.h
inc/MantidQtSliceViewer/QScienceSpinBox.h
inc/MantidQtSliceViewer/QwtRasterDataMD.h
inc/MantidQtSliceViewer/SliceViewer.h
Expand All @@ -48,7 +48,7 @@ set ( MOC_FILES
inc/MantidQtSliceViewer/LineOverlay.h
inc/MantidQtSliceViewer/LineViewer.h
inc/MantidQtSliceViewer/LinePlotOptions.h
inc/MantidQtSliceViewer/PeakOverlay.h
inc/MantidQtSliceViewer/PeakOverlay.h
inc/MantidQtSliceViewer/SliceViewer.h
inc/MantidQtSliceViewer/SliceViewerWindow.h
inc/MantidQtSliceViewer/ColorBarWidget.h
Expand All @@ -69,7 +69,7 @@ set ( UI_FILES

set ( TEST_FILES
test/ConcretePeaksPresenterTest.h
#test/PeakOverlayFactoryBaseTest.h
test/PeakOverlayFactoryBaseTest.h
)

# Python unit tests
Expand Down
21 changes: 16 additions & 5 deletions Code/Mantid/MantidQt/SliceViewer/test/PeakOverlayFactoryBaseTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ class PeakOverlayFactoryBaseTest : public CxxTest::TestSuite

MockPeakOverlayFactory mockFactory(mockQuery);

EXPECT_CALL(mockFactory, createViewAtPoint(_,_,hasVariableRadius)).Times(1).WillOnce(Return(PeakOverlayView_sptr(new MockPeakOverlayView)));
MockPeakOverlayView* pMockView = new MockPeakOverlayView;
PeakOverlayView_sptr mockView(pMockView);
EXPECT_CALL(mockFactory, createViewAtPoint(_,_,hasVariableRadius)).Times(1).WillOnce(Return(mockView));

mockFactory.createView(mockPeak);

Expand Down Expand Up @@ -244,7 +246,10 @@ class PeakOverlayFactoryBaseTest : public CxxTest::TestSuite
EXPECT_CALL(mockPeak, getQLabFrame()).Times(1).WillOnce(Return(Mantid::Kernel::V3D(0,0,0)));

MockPeakOverlayFactory mockFactory(mockQuery);
EXPECT_CALL(mockFactory, createViewAtPoint(_,_,_)).Times(1).WillOnce(Return(PeakOverlayView_sptr(new MockPeakOverlayView)));

MockPeakOverlayView* pMockView = new MockPeakOverlayView;
PeakOverlayView_sptr mockView(pMockView);
EXPECT_CALL(mockFactory, createViewAtPoint(_,_,_)).Times(1).WillOnce(Return(mockView));

mockFactory.createView(mockPeak);

Expand All @@ -264,7 +269,10 @@ class PeakOverlayFactoryBaseTest : public CxxTest::TestSuite
EXPECT_CALL(mockPeak, getQSampleFrame()).Times(1).WillOnce(Return(Mantid::Kernel::V3D(0,0,0)));

MockPeakOverlayFactory mockFactory(mockQuery);
EXPECT_CALL(mockFactory, createViewAtPoint(_,_,_)).Times(1).WillOnce(Return(PeakOverlayView_sptr(new MockPeakOverlayView)));

MockPeakOverlayView* pMockView = new MockPeakOverlayView;
PeakOverlayView_sptr mockView(pMockView);
EXPECT_CALL(mockFactory, createViewAtPoint(_,_,_)).Times(1).WillOnce(Return(mockView));

mockFactory.createView(mockPeak);

Expand All @@ -284,7 +292,10 @@ class PeakOverlayFactoryBaseTest : public CxxTest::TestSuite
EXPECT_CALL(mockPeak, getHKL()).Times(1).WillOnce(Return(Mantid::Kernel::V3D(0,0,0)));

MockPeakOverlayFactory mockFactory(mockQuery);
EXPECT_CALL(mockFactory, createViewAtPoint(_,_,_)).Times(1).WillOnce(Return(PeakOverlayView_sptr(new MockPeakOverlayView)));

MockPeakOverlayView* pMockView = new MockPeakOverlayView;
PeakOverlayView_sptr mockView(pMockView);
EXPECT_CALL(mockFactory, createViewAtPoint(_,_,_)).Times(1).WillOnce(Return(mockView));

mockFactory.createView(mockPeak);

Expand All @@ -299,4 +310,4 @@ class PeakOverlayFactoryBaseTest : public CxxTest::TestSuite
};


#endif /*SLICE_VIEWER_PEAKOVERLAYFACTORY_TEST_H_*/
#endif /*SLICE_VIEWER_PEAKOVERLAYFACTORY_TEST_H_*/

0 comments on commit 63553b4

Please sign in to comment.