Skip to content

Commit

Permalink
Merge branch 'master' into 10903_ida_abs_corr_tab
Browse files Browse the repository at this point in the history
Refs #10903
  • Loading branch information
DanNixon committed Apr 1, 2015
2 parents dde9c33 + f3f480a commit fa0f0a1
Show file tree
Hide file tree
Showing 440 changed files with 4,383 additions and 4,725 deletions.
1 change: 0 additions & 1 deletion Code/Mantid/Build/CMake/CommonVatesSetup.cmake
Expand Up @@ -7,7 +7,6 @@ Framework/API
Framework/Geometry
Framework/Kernel
Framework/DataObjects
Framework/MDEvents
)

set ( COMMONVATES_SETUP_DONE TRUE )
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/inc/MantidAPI/IMDNode.h
Expand Up @@ -53,7 +53,7 @@ class IMDNode {
*/

public:
virtual ~IMDNode(){};
virtual ~IMDNode(){}
//---------------- ISAVABLE
/**Return the pointer to the structure responsible for saving the box on disk
* if the workspace occupies too much memory */
Expand Down
3 changes: 0 additions & 3 deletions Code/Mantid/Framework/Algorithms/CMakeLists.txt
Expand Up @@ -43,7 +43,6 @@ set ( SRC_FILES
src/ConvertAxisByFormula.cpp
src/ConvertEmptyToTof.cpp
src/ConvertFromDistribution.cpp
src/ConvertMDHistoToMatrixWorkspace.cpp
src/ConvertSpectrumAxis.cpp
src/ConvertSpectrumAxis2.cpp
src/ConvertTableToMatrixWorkspace.cpp
Expand Down Expand Up @@ -300,7 +299,6 @@ set ( INC_FILES
inc/MantidAlgorithms/ConvertAxisByFormula.h
inc/MantidAlgorithms/ConvertEmptyToTof.h
inc/MantidAlgorithms/ConvertFromDistribution.h
inc/MantidAlgorithms/ConvertMDHistoToMatrixWorkspace.h
inc/MantidAlgorithms/ConvertSpectrumAxis.h
inc/MantidAlgorithms/ConvertSpectrumAxis2.h
inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h
Expand Down Expand Up @@ -568,7 +566,6 @@ set ( TEST_FILES
ConvertAxisByFormulaTest.h
ConvertEmptyToTofTest.h
ConvertFromDistributionTest.h
ConvertMDHistoToMatrixWorkspaceTest.h
ConvertSpectrumAxis2Test.h
ConvertSpectrumAxisTest.h
ConvertTableToMatrixWorkspaceTest.h
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/Algorithms/test/CMakeLists.txt
Expand Up @@ -27,19 +27,19 @@ if ( CXXTEST_FOUND )
configure_file ( PlusMinusTest.in.h ${CMAKE_CURRENT_SOURCE_DIR}/MinusTest.h)

# Make the rest of the tests
include_directories ( ../../CurveFitting/inc ../../DataHandling/inc ../../Nexus/inc ../../TestHelpers/inc ../../MDEvents/inc)
include_directories ( ../../CurveFitting/inc ../../DataHandling/inc ../../Nexus/inc ../../TestHelpers/inc )
# This variable is used within the cxxtest_add_test macro to build these helper classes into the test executable.
# It will go out of scope at the end of this file so doesn't need un-setting
set ( TESTHELPER_SRCS ../../TestHelpers/src/TearDownWorld.cpp
../../TestHelpers/src/ComponentCreationHelper.cpp
../../TestHelpers/src/WorkspaceCreationHelper.cpp
../../TestHelpers/src/SANSInstrumentCreationHelper.cpp
../../TestHelpers/src/MDEventsTestHelper.cpp
../../TestHelpers/src/MDEventsTestHelper.cpp
../../TestHelpers/src/ScopedFileHelper.cpp
)
cxxtest_add_test ( AlgorithmsTest ${TEST_FILES} )
target_link_libraries ( AlgorithmsTest Algorithms DataHandling MDEvents ${GMOCK_LIBRARIES} )
add_dependencies ( AlgorithmsTest Crystal CurveFitting MDAlgorithms )
target_link_libraries ( AlgorithmsTest Algorithms DataHandling ${GMOCK_LIBRARIES} )
add_dependencies ( AlgorithmsTest Crystal CurveFitting )
add_dependencies ( FrameworkTests AlgorithmsTest )
# Test data
add_dependencies ( AlgorithmsTest StandardTestData )
Expand Down
Expand Up @@ -8,21 +8,20 @@
#include "MantidKernel/UnitFactory.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidDataObjects/PeaksWorkspace.h"
#include "MantidMDEvents/MDHistoWorkspace.h"
#include "MantidDataObjects/MDHistoWorkspace.h"
#include "MantidTestHelpers/WorkspaceCreationHelper.h"
#include "MantidTestHelpers/MDEventsTestHelper.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidAlgorithms/CreatePeaksWorkspace.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidGeometry/Instrument.h"
#include "MantidMDEvents/MDBoxBase.h"
#include "MantidDataObjects/MDBoxBase.h"
#include "MantidKernel/V3D.h"

using namespace Mantid::Algorithms;
using namespace Mantid::API;
using namespace Mantid::DataObjects;
using namespace Mantid::Geometry;
using namespace Mantid::MDEvents;

class CheckWorkspacesMatchTest : public CxxTest::TestSuite
{
Expand Down Expand Up @@ -218,8 +217,8 @@ class CheckWorkspacesMatchTest : public CxxTest::TestSuite
void testMDEvents_matches()
{
if ( !checker.isInitialized() ) checker.initialize();
MDEventWorkspace3Lean::sptr mdews1 = MDEventsTestHelper::makeFileBackedMDEW("mdev1", false);
MDEventWorkspace3Lean::sptr mdews2 = MDEventsTestHelper::makeFileBackedMDEW("mdev2", false);
MDEventWorkspace3Lean::sptr mdews1 = MDEventsTestHelper::makeFakeMDEventWorkspace("mdev1");
MDEventWorkspace3Lean::sptr mdews2 = MDEventsTestHelper::makeFakeMDEventWorkspace("mdev2");
TS_ASSERT_THROWS_NOTHING( checker.setProperty("Workspace1", boost::dynamic_pointer_cast<IMDWorkspace>(mdews1)) );
TS_ASSERT_THROWS_NOTHING( checker.setProperty("Workspace2", boost::dynamic_pointer_cast<IMDWorkspace>(mdews2)) );
TS_ASSERT( checker.execute() );
Expand Down
5 changes: 2 additions & 3 deletions Code/Mantid/Framework/Algorithms/test/CloneWorkspaceTest.h
Expand Up @@ -10,7 +10,7 @@
#include "MantidTestHelpers/WorkspaceCreationHelper.h"
#include "MantidTestHelpers/ComponentCreationHelper.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidMDEvents/MDEventFactory.h"
#include "MantidDataObjects/MDEventFactory.h"
#include "MantidTestHelpers/MDEventsTestHelper.h"
#include "MantidGeometry/Instrument.h"
#include "MantidDataObjects/PeaksWorkspace.h"
Expand All @@ -19,8 +19,7 @@ using namespace Mantid;
using namespace Mantid::Geometry;
using namespace Mantid::API;
using namespace Mantid::DataObjects;
using namespace Mantid::MDEvents;
using Mantid::MDEvents::MDEventsTestHelper::makeMDEW;
using Mantid::DataObjects::MDEventsTestHelper::makeMDEW;

class CloneWorkspaceTest : public CxxTest::TestSuite
{
Expand Down
5 changes: 5 additions & 0 deletions Code/Mantid/Framework/Algorithms/test/ConvertEmptyToTofTest.h
Expand Up @@ -6,6 +6,7 @@

#include "MantidAlgorithms/ConvertEmptyToTof.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidTestHelpers/WorkspaceCreationHelper.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidGeometry/Instrument/ComponentHelper.h"
Expand All @@ -25,6 +26,10 @@ class ConvertEmptyToTofTest: public CxxTest::TestSuite {
delete suite;
}

ConvertEmptyToTofTest() {
FrameworkManager::Instance();
}

void test_Init() {
ConvertEmptyToTof alg;
TS_ASSERT_THROWS_NOTHING(alg.initialize())
Expand Down
10 changes: 3 additions & 7 deletions Code/Mantid/Framework/Algorithms/test/CopySampleTest.h
Expand Up @@ -2,9 +2,6 @@
#define MANTID_ALGORITHMS_COPYSAMPLETEST_H_

#include <cxxtest/TestSuite.h>
#include "MantidKernel/Timer.h"
#include <iostream>
#include <iomanip>

#include "MantidAlgorithms/CopySample.h"
#include "MantidDataObjects/WorkspaceSingleValue.h"
Expand All @@ -16,9 +13,9 @@
#include "MantidGeometry/Instrument/ObjComponent.h"
#include "MantidGeometry/Objects/Object.h"

#include "MantidMDEvents/MDEvent.h"
#include "MantidMDEvents/MDEventFactory.h"
#include "MantidMDEvents/MDEventWorkspace.h"
#include "MantidDataObjects/MDEvent.h"
#include "MantidDataObjects/MDEventFactory.h"
#include "MantidDataObjects/MDEventWorkspace.h"
#include "MantidTestHelpers/ComponentCreationHelper.h"

using namespace Mantid;
Expand All @@ -27,7 +24,6 @@ using namespace Mantid::API;
using namespace Mantid::DataObjects;
using namespace Mantid::Geometry;
using namespace Mantid::Kernel;
using namespace Mantid::MDEvents;

class CopySampleTest : public CxxTest::TestSuite
{
Expand Down
Expand Up @@ -3,6 +3,7 @@

#include <cxxtest/TestSuite.h>

#include "MantidAPI/FrameworkManager.h"
#include "MantidGeometry/Instrument.h"
#include "MantidGeometry/IComponent.h"
#include "MantidGeometry/Instrument/ReferenceFrame.h"
Expand All @@ -25,6 +26,9 @@ class CreateSampleWorkspaceTest : public CxxTest::TestSuite
static CreateSampleWorkspaceTest *createSuite() { return new CreateSampleWorkspaceTest(); }
static void destroySuite( CreateSampleWorkspaceTest *suite ) { delete suite; }

CreateSampleWorkspaceTest() {
FrameworkManager::Instance();
}

void test_Init()
{
Expand Down
10 changes: 9 additions & 1 deletion Code/Mantid/Framework/Algorithms/test/ElasticWindowTest.h
Expand Up @@ -5,7 +5,7 @@

#include <iostream>
#include <iomanip>

#include "MantidAPI/FrameworkManager.h"
#include "MantidKernel/System.h"

#include "MantidAlgorithms/ConvertUnits.h"
Expand All @@ -24,6 +24,14 @@ using namespace Mantid::Kernel::Units;
class ElasticWindowTest : public CxxTest::TestSuite
{
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static ElasticWindowTest *createSuite() { return new ElasticWindowTest(); }
static void destroySuite( ElasticWindowTest *suite ) { delete suite; }

ElasticWindowTest() {
FrameworkManager::Instance();
}

void setUp()
{
Expand Down
Expand Up @@ -5,6 +5,7 @@
#include <algorithm>
#include "MantidAlgorithms/ReflectometryReductionOne.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidTestHelpers/WorkspaceCreationHelper.h"
#include "MantidGeometry/Instrument/ReferenceFrame.h"
Expand Down Expand Up @@ -36,6 +37,7 @@ class ReflectometryReductionOneTest: public CxxTest::TestSuite

ReflectometryReductionOneTest()
{
FrameworkManager::Instance();
m_tinyReflWS = create2DWorkspaceWithReflectometryInstrument();
}

Expand Down
11 changes: 10 additions & 1 deletion Code/Mantid/Framework/Algorithms/test/RemoveExpDecayTest.h
Expand Up @@ -2,7 +2,7 @@
#define MUONREMOVEEXPDECAYTEST_H_

#include <cxxtest/TestSuite.h>

#include "MantidAPI/FrameworkManager.h"
#include "MantidAlgorithms/RemoveExpDecay.h"
#include "MantidTestHelpers/WorkspaceCreationHelper.h"

Expand All @@ -14,6 +14,15 @@ const std::string outputName = "MuonRemoveExpDecay_Output";
class RemoveExpDecayTest : public CxxTest::TestSuite
{
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static RemoveExpDecayTest *createSuite() { return new RemoveExpDecayTest(); }
static void destroySuite( RemoveExpDecayTest *suite ) { delete suite; }

RemoveExpDecayTest() {
FrameworkManager::Instance();
}


void testInit()
{
Expand Down
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/Algorithms/test/StripPeaksTest.h
Expand Up @@ -6,6 +6,7 @@

#include "MantidAlgorithms/StripPeaks.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidKernel/UnitFactory.h"

using namespace Mantid::API;
Expand All @@ -20,6 +21,7 @@ class StripPeaksTest : public CxxTest::TestSuite

StripPeaksTest()
{
FrameworkManager::Instance();
MatrixWorkspace_sptr WS = WorkspaceCreationHelper::Create2DWorkspaceBinned(2,200,0.5,0.02);
WS->getAxis(0)->unit() = Mantid::Kernel::UnitFactory::Instance().create("dSpacing");

Expand Down
7 changes: 6 additions & 1 deletion Code/Mantid/Framework/Algorithms/test/WienerSmoothTest.h
Expand Up @@ -4,6 +4,7 @@
#include <cxxtest/TestSuite.h>

#include "MantidAlgorithms/WienerSmooth.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/WorkspaceFactory.h"

#include <algorithm>
Expand All @@ -19,6 +20,10 @@ class WienerSmoothTest : public CxxTest::TestSuite
static WienerSmoothTest *createSuite() { return new WienerSmoothTest(); }
static void destroySuite( WienerSmoothTest *suite ) { delete suite; }

WienerSmoothTest() {
FrameworkManager::Instance();
}


void test_Init()
{
Expand Down Expand Up @@ -261,4 +266,4 @@ class WienerSmoothTest : public CxxTest::TestSuite
};


#endif /* MANTID_ALGORITHMS_WIENERSMOOTHTEST_H_ */
#endif /* MANTID_ALGORITHMS_WIENERSMOOTHTEST_H_ */
3 changes: 1 addition & 2 deletions Code/Mantid/Framework/CMakeLists.txt
Expand Up @@ -125,7 +125,6 @@ if ( CXXTEST_FOUND )
endif ()

add_subdirectory (MDAlgorithms)
add_subdirectory (MDEvents)
add_subdirectory (Doxygen)
add_subdirectory (ScriptRepository)
add_subdirectory (ISISLiveData)
Expand All @@ -137,7 +136,7 @@ add_subdirectory (ISISLiveData)
set ( FRAMEWORK_LIBS Kernel Geometry API PythonKernelModule
PythonGeometryModule PythonAPIModule DataObjects
DataHandling Nexus Algorithms CurveFitting ICat
Crystal MDAlgorithms MDEvents WorkflowAlgorithms
Crystal MDAlgorithms WorkflowAlgorithms
LiveData ISISLiveData RemoteAlgorithms SINQ
)

Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/Crystal/test/CMakeLists.txt
@@ -1,15 +1,15 @@
if ( CXXTEST_FOUND )
include_directories ( SYSTEM ${CXXTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} )

include_directories ( ../../DataHandling/inc ../../MDEvents/inc ../../TestHelpers/inc )
include_directories ( ../../DataHandling/inc ../../TestHelpers/inc )
# This variable is used within the cxxtest_add_test macro to build these helper classes into the test executable.
# It will go out of scope at the end of this file so doesn't need un-setting
set ( TESTHELPER_SRCS ../../TestHelpers/src/TearDownWorld.cpp
../../TestHelpers/src/ComponentCreationHelper.cpp
../../TestHelpers/src/WorkspaceCreationHelper.cpp
../../TestHelpers/src/MDEventsTestHelper.cpp )
cxxtest_add_test ( CrystalTest ${TEST_FILES} )
target_link_libraries ( CrystalTest Crystal DataHandling MDEvents MDAlgorithms ${GMOCK_LIBRARIES} ${GTEST_LIBRARIES})
target_link_libraries ( CrystalTest Crystal DataHandling MDAlgorithms ${GMOCK_LIBRARIES} ${GTEST_LIBRARIES})
add_dependencies ( CrystalTest Algorithms CurveFitting )
add_dependencies ( FrameworkTests CrystalTest )
# Test data
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Crystal/test/ClearUBTest.h
Expand Up @@ -10,8 +10,8 @@
#include "MantidDataObjects/TableWorkspace.h"

using Mantid::Crystal::ClearUB;
using namespace Mantid::MDEvents;
using namespace Mantid::API;
using namespace Mantid::DataObjects;
using namespace Mantid::Geometry;

class ClearUBTest : public CxxTest::TestSuite
Expand Down
Expand Up @@ -12,7 +12,6 @@
#include "MantidTestHelpers/MDEventsTestHelper.h"
#include "MantidTestHelpers/WorkspaceCreationHelper.h"
#include "MantidTestHelpers/ComponentCreationHelper.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/Workspace.h"
#include "MantidKernel/V3D.h"
Expand All @@ -24,9 +23,8 @@

using namespace Mantid::API;
using namespace Mantid::Kernel;
using namespace Mantid::MDEvents;
using namespace Mantid::Geometry;
using namespace Mantid::DataObjects;
using namespace Mantid::Geometry;

// Helper typedef
typedef boost::tuple<IMDHistoWorkspace_sptr, IPeaksWorkspace_sptr> MDHistoPeaksWSTuple;
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Crystal/test/ClusterTest.h
Expand Up @@ -8,7 +8,7 @@

using Mantid::Crystal::Cluster;
using namespace Mantid::API;
using namespace Mantid::MDEvents;
using namespace Mantid::DataObjects;

class ClusterTest : public CxxTest::TestSuite
{
Expand Down
Expand Up @@ -20,7 +20,7 @@

using namespace Mantid::Crystal;
using namespace Mantid::API;
using namespace Mantid::MDEvents;
using namespace Mantid::DataObjects;
using namespace testing;

namespace
Expand Down

0 comments on commit fa0f0a1

Please sign in to comment.