Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
56c1cc33
Commit
56c1cc33
authored
9 years ago
by
Harry Jeffery
Browse files
Options
Downloads
Patches
Plain Diff
Refs #11355 Add stub CutMD C++ test
parent
9ff0c83f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt
Code/Mantid/Framework/MDAlgorithms/test/CutMDTest.h
+68
-0
68 additions, 0 deletions
Code/Mantid/Framework/MDAlgorithms/test/CutMDTest.h
with
69 additions
and
0 deletions
Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt
+
1
−
0
View file @
56c1cc33
...
...
@@ -197,6 +197,7 @@ set ( TEST_FILES
ConvertToQ3DdETest.h
CreateMDHistoWorkspaceTest.h
CreateMDWorkspaceTest.h
CutMDTest.h
DivideMDTest.h
EqualToMDTest.h
EvaluateMDFunctionTest.h
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/Framework/MDAlgorithms/test/CutMDTest.h
0 → 100644
+
68
−
0
View file @
56c1cc33
#ifndef MANTID_MDALGORITHMS_CUTMDTEST_H_
#define MANTID_MDALGORITHMS_CUTMDTEST_H_
#include
"MantidMDAlgorithms/CutMD.h"
#include
"MantidAPI/FrameworkManager.h"
#include
"MantidAPI/IMDWorkspace.h"
#include
"MantidAPI/IMDEventWorkspace.h"
#include
<cxxtest/TestSuite.h>
using
namespace
Mantid
::
MDAlgorithms
;
using
namespace
Mantid
::
API
;
using
namespace
Mantid
::
Kernel
;
namespace
{
const
std
::
string
sharedWSName
=
"__CutMDTest_dataWS"
;
}
class
CutMDTest
:
public
CxxTest
::
TestSuite
{
private:
IMDWorkspace_sptr
m_inWS
;
public:
CutMDTest
()
{
FrameworkManager
::
Instance
().
exec
(
"CreateMDWorkspace"
,
10
,
"OutputWorkspace"
,
sharedWSName
.
c_str
(),
"Dimensions"
,
"3"
,
"Extents"
,
"-10,10,-10,10,-10,10"
,
"Names"
,
"A,B,C"
,
"Units"
,
"U,U,U"
);
FrameworkManager
::
Instance
().
exec
(
"SetSpecialCoordinates"
,
4
,
"InputWorkspace"
,
sharedWSName
.
c_str
(),
"SpecialCoordinates"
,
"HKL"
);
FrameworkManager
::
Instance
().
exec
(
"SetUB"
,
14
,
"Workspace"
,
sharedWSName
.
c_str
(),
"a"
,
"1"
,
"b"
,
"1"
,
"c"
,
"1"
,
"alpha"
,
"90"
,
"beta"
,
"90"
,
"gamma"
,
"90"
);
FrameworkManager
::
Instance
().
exec
(
"FakeMDEventData"
,
4
,
"InputWorkspace"
,
sharedWSName
.
c_str
(),
"PeakParams"
,
"10000,0,0,0,1"
);
m_inWS
=
AnalysisDataService
::
Instance
().
retrieveWS
<
IMDWorkspace
>
(
sharedWSName
);
}
virtual
~
CutMDTest
()
{
AnalysisDataService
::
Instance
().
remove
(
sharedWSName
);
}
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static
CutMDTest
*
createSuite
()
{
return
new
CutMDTest
();
}
static
void
destroySuite
(
CutMDTest
*
suite
)
{
delete
suite
;
}
void
test_init
()
{
CutMD
alg
;
TS_ASSERT_THROWS_NOTHING
(
alg
.
initialize
())
TS_ASSERT
(
alg
.
isInitialized
())
}
};
#endif
/* MANTID_MDALGORITHMS_CUTMDTEST_H_ */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment