Skip to content

Commit

Permalink
Re #11508 Nailing down OSX failure.
Browse files Browse the repository at this point in the history
Completely remove offending includes from test file
  • Loading branch information
abuts committed Apr 23, 2015
1 parent a36bd2a commit 4574276
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions Code/Mantid/Framework/DataHandling/test/LoadParameterFileTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include <cxxtest/TestSuite.h>

#include "MantidDataHandling/LoadParameterFile.h"
#include "MantidDataHandling/LoadInstrument.h"
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidAPI/AnalysisDataService.h"
Expand All @@ -19,7 +17,6 @@
using namespace Mantid::API;
using namespace Mantid::Kernel;
using namespace Mantid::Geometry;
using namespace Mantid::DataHandling;
using namespace Mantid::DataObjects;

class LoadParameterFileTest : public CxxTest::TestSuite
Expand All @@ -40,12 +37,13 @@ class LoadParameterFileTest : public CxxTest::TestSuite


// load in additional parameters
LoadParameterFile loaderPF;
TS_ASSERT_THROWS_NOTHING(loaderPF.initialize());
loaderPF.setPropertyValue("Filename", "IDFs_for_UNIT_TESTING/IDF_for_UNIT_TESTING2_paramFile.xml");
loaderPF.setPropertyValue("Workspace", wsName);
TS_ASSERT_THROWS_NOTHING(loaderPF.execute());
TS_ASSERT( loaderPF.isExecuted() );
auto pLoaderPF = FrameworkManager::Instance().createAlgorithm("LoadParameterFile");

TS_ASSERT_THROWS_NOTHING(pLoaderPF->initialize());
pLoaderPF->setPropertyValue("Filename", "IDFs_for_UNIT_TESTING/IDF_for_UNIT_TESTING2_paramFile.xml");
pLoaderPF->setPropertyValue("Workspace", wsName);
TS_ASSERT_THROWS_NOTHING(pLoaderPF->execute());
TS_ASSERT( pLoaderPF->isExecuted() );


// Get back the saved workspace
Expand Down Expand Up @@ -121,12 +119,14 @@ class LoadParameterFileTest : public CxxTest::TestSuite
"</parameter-file>";

// load in additional parameters
LoadParameterFile loaderPF;
TS_ASSERT_THROWS_NOTHING(loaderPF.initialize());
loaderPF.setPropertyValue("ParameterXML", parameterXML);
loaderPF.setPropertyValue("Workspace", wsName);
TS_ASSERT_THROWS_NOTHING(loaderPF.execute());
TS_ASSERT( loaderPF.isExecuted() );
auto pLoaderPF = FrameworkManager::Instance().createAlgorithm("LoadParameterFile");


TS_ASSERT_THROWS_NOTHING(pLoaderPF->initialize());
pLoaderPF->setPropertyValue("ParameterXML", parameterXML);
pLoaderPF->setPropertyValue("Workspace", wsName);
TS_ASSERT_THROWS_NOTHING(pLoaderPF->execute());
TS_ASSERT( pLoaderPF->isExecuted() );

// Get back the saved workspace
MatrixWorkspace_sptr output;
Expand Down Expand Up @@ -174,18 +174,18 @@ class LoadParameterFileTest : public CxxTest::TestSuite
load_IDF2();

// Run algorithm without file or string properties set
LoadParameterFile loaderPF;
TS_ASSERT_THROWS_NOTHING(loaderPF.initialize());
loaderPF.setPropertyValue("Workspace", wsName);
TS_ASSERT_THROWS_NOTHING(loaderPF.execute());
TS_ASSERT( ! loaderPF.execute() )
auto pLoaderPF = FrameworkManager::Instance().createAlgorithm("LoadParameterFile");
TS_ASSERT_THROWS_NOTHING(pLoaderPF->initialize());
pLoaderPF->setPropertyValue("Workspace", wsName);
TS_ASSERT_THROWS_NOTHING(pLoaderPF->execute());
TS_ASSERT( ! pLoaderPF->execute() )
}

void load_IDF2()
{
LoadInstrument loaderIDF2;
auto pLoadInstrument = FrameworkManager::Instance().createAlgorithm("LoadInstrument");

TS_ASSERT_THROWS_NOTHING(loaderIDF2.initialize());
TS_ASSERT_THROWS_NOTHING(pLoadInstrument->initialize());

//create a workspace with some sample data
wsName = "LoadParameterFileTestIDF2";
Expand All @@ -196,11 +196,11 @@ class LoadParameterFileTest : public CxxTest::TestSuite
TS_ASSERT_THROWS_NOTHING(AnalysisDataService::Instance().add(wsName, ws2D));

// Path to test input file assumes Test directory checked out from git
loaderIDF2.setPropertyValue("Filename", "IDFs_for_UNIT_TESTING/IDF_for_UNIT_TESTING2.xml");
pLoadInstrument->setPropertyValue("Filename", "IDFs_for_UNIT_TESTING/IDF_for_UNIT_TESTING2.xml");
//inputFile = loaderIDF2.getPropertyValue("Filename");
loaderIDF2.setPropertyValue("Workspace", wsName);
TS_ASSERT_THROWS_NOTHING(loaderIDF2.execute());
TS_ASSERT( loaderIDF2.isExecuted() );
pLoadInstrument->setPropertyValue("Workspace", wsName);
TS_ASSERT_THROWS_NOTHING(pLoadInstrument->execute());
TS_ASSERT( pLoadInstrument->isExecuted() );

}

Expand Down

0 comments on commit 4574276

Please sign in to comment.