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
92224e69
Commit
92224e69
authored
9 years ago
by
Raquel Alvarez Banos
Browse files
Options
Downloads
Patches
Plain Diff
Re #13968 Test some output values
parent
c60fd519
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/Algorithms/test/RemoveExpDecayTest.h
+31
-3
31 additions, 3 deletions
Framework/Algorithms/test/RemoveExpDecayTest.h
with
31 additions
and
3 deletions
Framework/Algorithms/test/RemoveExpDecayTest.h
+
31
−
3
View file @
92224e69
...
@@ -42,9 +42,9 @@ public:
...
@@ -42,9 +42,9 @@ public:
MatrixWorkspace_sptr
outWS
=
alg
->
getProperty
(
"OutputWorkspace"
);
MatrixWorkspace_sptr
outWS
=
alg
->
getProperty
(
"OutputWorkspace"
);
}
}
void
test
ExecuteWhereSepctraNotSet
()
{
void
test
_TwoSpectra
()
{
auto
ws
=
createWorkspace
(
4
,
50
);
auto
ws
=
createWorkspace
(
2
,
50
);
IAlgorithm_sptr
alg
=
AlgorithmManager
::
Instance
().
create
(
"RemoveExpDecay"
);
IAlgorithm_sptr
alg
=
AlgorithmManager
::
Instance
().
create
(
"RemoveExpDecay"
);
alg
->
initialize
();
alg
->
initialize
();
...
@@ -52,9 +52,37 @@ public:
...
@@ -52,9 +52,37 @@ public:
alg
->
setProperty
(
"InputWorkspace"
,
ws
);
alg
->
setProperty
(
"InputWorkspace"
,
ws
);
alg
->
setPropertyValue
(
"OutputWorkspace"
,
outputName
);
alg
->
setPropertyValue
(
"OutputWorkspace"
,
outputName
);
TS_ASSERT_THROWS_NOTHING
(
alg
->
execute
());
TS_ASSERT_THROWS_NOTHING
(
alg
->
execute
());
TS_ASSERT
(
alg
->
isExecuted
())
TS_ASSERT
(
alg
->
isExecuted
())
;
MatrixWorkspace_sptr
outWS
=
alg
->
getProperty
(
"OutputWorkspace"
);
MatrixWorkspace_sptr
outWS
=
alg
->
getProperty
(
"OutputWorkspace"
);
// First spectrum
// Test some X values
TS_ASSERT_DELTA
(
outWS
->
readX
(
0
)[
10
],
0.2000
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readX
(
0
)[
19
],
0.3800
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readX
(
0
)[
49
],
0.9800
,
0.0001
);
// Test some Y values
TS_ASSERT_DELTA
(
outWS
->
readY
(
0
)[
10
],
-
0.0992
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readY
(
0
)[
19
],
-
0.0111
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readY
(
0
)[
49
],
-
0.0622
,
0.0001
);
// Test some E values
TS_ASSERT_DELTA
(
outWS
->
readE
(
0
)[
10
],
0.0054
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readE
(
0
)[
19
],
0.0059
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readE
(
0
)[
49
],
0.0077
,
0.0001
);
// Second spectrum
// Test some X values
TS_ASSERT_DELTA
(
outWS
->
readX
(
1
)[
10
],
0.2000
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readX
(
1
)[
19
],
0.3800
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readX
(
1
)[
49
],
0.9800
,
0.0001
);
// Test some Y values
TS_ASSERT_DELTA
(
outWS
->
readY
(
1
)[
10
],
0.0274
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readY
(
1
)[
19
],
-
0.1003
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readY
(
1
)[
49
],
0.0802
,
0.0001
);
// Test some E values
TS_ASSERT_DELTA
(
outWS
->
readE
(
1
)[
10
],
0.0054
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readE
(
1
)[
19
],
0.0059
,
0.0001
);
TS_ASSERT_DELTA
(
outWS
->
readE
(
1
)[
49
],
0.0078
,
0.0001
);
}
}
void
test_yUnitLabel
()
{
void
test_yUnitLabel
()
{
...
...
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