Skip to content
Snippets Groups Projects
Commit c448736c authored by Russell Taylor's avatar Russell Taylor
Browse files

Add back in some tests that now pass under CMake. Re #1881.

parent 35c738af
No related merge requests found
......@@ -122,7 +122,7 @@ set ( INC_FILES inc/MantidDataHandling/CreateSampleShape.h
set ( TEST_FILES #test/CreateSampleShapeTest.h # TODO uses WorkspaceCreationHelper.hh
test/DefineGaugeVolumeTest.h
#test/FindDetectorsInShapeTest.h # TODO exception
test/FindDetectorsInShapeTest.h
test/GetMaskedDetectorsTest.h
test/GroupDetectors2Test.h
test/GroupDetectorsTest.h
......@@ -150,19 +150,18 @@ set ( TEST_FILES #test/CreateSampleShapeTest.h # TODO uses WorkspaceCreationHelp
test/LoadSPETest.h
test/LoadSpice2dTest.h
test/LoadTest.h
#test/ManagedRawFileWorkspace2DTest.h # TODO exception
#test/MaskDetectorsInShapeTest.h # TODO exception
test/ManagedRawFileWorkspace2DTest.h
test/MaskDetectorsInShapeTest.h
test/MaskDetectorsTest.h
test/MoveInstrumentComponentTest.h
test/RawFileInfoTest.h
#test/SaveCanSAS1dTest.h # TODO exception
test/SaveCanSAS1dTest.h
test/SaveCSVTest.h
test/saveDASCTest.h
#test/SaveFocussedXYETest.h # TODO uses WorkspaceCreationHelper.hh
test/SavePHXTest.h
#test/SaveRKHTest.h # TODO uses WorkspaceCreationHelper.hh
#test/SaveSPETest.h # TODO uses WorkspaceCreationHelper.hh
#test/SetScalingPSDrawtest.h # TODO exception
#test/SetScalingPSDtest.h # TODO uses WorkspaceCreationHelper.hh
test/UpdateInstrumentFromRawTest.h
test/XMLlogfileTest.h )
......
......@@ -3,12 +3,11 @@
#include <cxxtest/TestSuite.h>
#include "MantidDataHandling/ManagedRawFileWorkspace2D.h"
#include <iostream>
#include "MantidKernel/ConfigService.h"
#include "MantidAPI/FileFinder.h"
#include "MantidDataHandling/LoadRaw2.h"
#include "MantidKernel/TimeSeriesProperty.h"
#include "MantidAPI/SpectraDetectorMap.h"
#include "Poco/Path.h"
using namespace Mantid::API;
using namespace Mantid::Kernel;
......@@ -21,7 +20,8 @@ class ManagedRawFileWorkspace2DTest : public CxxTest::TestSuite
public:
ManagedRawFileWorkspace2DTest()
{
Workspace = new ManagedRawFileWorkspace2D("../../../../../Test/AutoTestData/HET15869.raw",2);
file = FileFinder::Instance().getFullPath("HET15869.raw");
Workspace = new ManagedRawFileWorkspace2D(file,2);
}
~ManagedRawFileWorkspace2DTest()
......@@ -52,7 +52,7 @@ public:
void testData()
{
ManagedRawFileWorkspace2D ws("../../../../../Test/AutoTestData/HET15869.raw");
ManagedRawFileWorkspace2D ws(file);
const MantidVec& x0 = ws.readX(0);
TS_ASSERT_EQUALS( x0[0], 5. )
......@@ -72,7 +72,7 @@ public:
void testChanges()
{
ManagedRawFileWorkspace2D ws("../../../../../Test/AutoTestData/HET15869.raw");
ManagedRawFileWorkspace2D ws(file);
MantidVec& y0 = ws.dataY(0);
y0[100] = 1234.;
......@@ -140,7 +140,7 @@ public:
//----------------------------------------------------------------------
// Tests taken from LoadInstrumentTest to check sub-algorithm is running properly
//----------------------------------------------------------------------
boost::shared_ptr<IInstrument> i = output2D->getInstrument();
boost::shared_ptr<Mantid::Geometry::IInstrument> i = output2D->getInstrument();
boost::shared_ptr<Mantid::Geometry::IComponent> source = i->getSource();
TS_ASSERT_EQUALS( source->getName(), "undulator");
......@@ -199,6 +199,7 @@ public:
private:
ManagedRawFileWorkspace2D* Workspace;
std::string file;
};
#endif /*ManagedRawFileWorkspace2DTEST_H_*/
......@@ -30,16 +30,16 @@ set ( INC_FILES inc/MantidDataObjects/AbsManagedWorkspace2D.h
set ( TEST_FILES test/CompressedWorkspace2DTest.h
test/EventListTest.h
#test/EventWorkspaceTest.h # TODO uses ComponentCreationHelpers.hh
#test/Histogram1DTest.h # TODO fails to build
#test/LibraryManagerTest.h # TODO fails to build
test/Histogram1DTest.h
#test/LibraryManagerTest.h # TODO fails because UserAlgorithms not built
test/ManagedDataBlock2DTest.h
#test/ManagedWorkspace2DTest.h # TODO fails to build
test/ManagedWorkspace2DTest.h
test/RefAxisTest.h
test/TableWorkspacePropertyTest.h
test/TableWorkspaceTest.h
test/Workspace2DTest.h
test/WorkspaceHistoryTest.h
#test/WorkspaceIteratorTest.h # TODO fails to build
test/WorkspaceIteratorTest.h
test/WorkspaceSingleValueTest.h
test/WorkspaceValidatorsTest.h )
......
......@@ -72,7 +72,7 @@ public:
W1D Create1DWorkspaceFib(int size)
{
MantidVecPtr x1,y1,e1;
Mantid::MantidVecPtr x1,y1,e1;
y1.access().resize(size);
std::generate(y1.access().begin(),y1.access().end(),FibSeries<double>());
e1.access().resize(size);
......
......@@ -197,12 +197,18 @@ if ( CXXTEST_FOUND )
target_link_libraries( KernelTest Kernel )
add_dependencies ( FrameworkTests KernelTest )
add_custom_command ( TARGET Kernel POST_BUILD
add_custom_command ( TARGET KernelTest POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/../Build/Tests/MantidTest.properties
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
)
add_custom_command ( TARGET KernelTest POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/../Build/Tests/MantidTest.user.properties
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
)
endif ()
......
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