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
3312b4d9
Commit
3312b4d9
authored
9 years ago
by
Matt King
Browse files
Options
Downloads
Patches
Plain Diff
fixed comparison between min and max when min larger
Refs #13508
parent
ccd0912e
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
Framework/MDAlgorithms/src/CompactMD.cpp
+1
-1
1 addition, 1 deletion
Framework/MDAlgorithms/src/CompactMD.cpp
Framework/MDAlgorithms/test/CompactMDTest.h
+32
-0
32 additions, 0 deletions
Framework/MDAlgorithms/test/CompactMDTest.h
with
33 additions
and
1 deletion
Framework/MDAlgorithms/src/CompactMD.cpp
+
1
−
1
View file @
3312b4d9
...
...
@@ -17,7 +17,7 @@ createPBinStringVector(std::vector<Mantid::coord_t> minVector,
std
::
vector
<
std
::
string
>
pBinStrVector
;
for
(
size_t
iter
=
0
;
iter
<
numDims
;
iter
++
)
{
// creating pbin string using Min and Max Centre positions
if
(
minVector
[
iter
]
>
maxVector
[
iter
])
{
if
(
minVector
[
iter
]
>
=
maxVector
[
iter
])
{
throw
std
::
invalid_argument
(
"Minimum extents MUST be less than Maximum extents"
);
}
...
...
This diff is collapsed.
Click to expand it.
Framework/MDAlgorithms/test/CompactMDTest.h
+
32
−
0
View file @
3312b4d9
...
...
@@ -240,4 +240,36 @@ public:
// Performance Tests
//===================
// TODO:
using
namespace
Mantid
::
DataObjects
;
class
CompactMDTestPerformance
:
public
CxxTest
::
TestSuite
{
private:
MDHistoWorkspace_sptr
m_ws
;
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static
CompactMDTestPerformance
*
createSuite
()
{
return
new
CompactMDTestPerformance
();
}
static
void
destroySuite
(
CompactMDTestPerformance
*
suite
)
{
delete
suite
;
}
CompactMDTestPerformance
()
{
// Create a 4D workspace.
m_ws
=
MDEventsTestHelper
::
makeFakeMDHistoWorkspace
(
1.0
/*signal*/
,
4
/*nd*/
,
100
/*nbins*/
,
10
/*max*/
,
1.0
/*error sq*/
);
}
void
test_execute_4d
()
{
CompactMD
alg
;
alg
.
setChild
(
true
);
alg
.
setRethrows
(
true
);
alg
.
initialize
();
alg
.
setProperty
(
"InputWorkspace"
,
m_ws
);
alg
.
setProperty
(
"OutputWorkspace"
,
"out"
);
alg
.
execute
();
IMDHistoWorkspace_sptr
outWS
=
alg
.
getProperty
(
"OutputWorkspace"
);
TS_ASSERT
(
outWS
);
}
};
#endif // !MANTID_MDALGORITHMS_COMPACTMDTEST_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