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
98655f0e
Commit
98655f0e
authored
6 years ago
by
Robert Applin
Browse files
Options
Downloads
Patches
Plain Diff
Refs #23463. Add unit test
parent
751d5beb
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
qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h
+17
-0
17 additions, 0 deletions
qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h
with
17 additions
and
0 deletions
qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h
+
17
−
0
View file @
98655f0e
...
@@ -84,6 +84,23 @@ public:
...
@@ -84,6 +84,23 @@ public:
TS_ASSERT_EQUALS
(
*
it
,
spectraVec
[
it
-
spectra
.
begin
()]);
TS_ASSERT_EQUALS
(
*
it
,
spectraVec
[
it
-
spectra
.
begin
()]);
}
}
void
test_that_DiscontinuousSpectra_is_sorted_before_being_stored
()
{
auto
data
=
getIndirectFitData
(
11
,
3
);
std
::
vector
<
std
::
string
>
const
inputStrings
{
"8,5-0,6,10"
,
" 8,10, 7"
,
"1,2,4-3,10"
};
std
::
vector
<
Spectra
>
const
anwserSpectra
{
DiscontinuousSpectra
<
std
::
size_t
>
(
"0-6,8,10"
),
DiscontinuousSpectra
<
std
::
size_t
>
(
"7-8,10"
),
DiscontinuousSpectra
<
std
::
size_t
>
(
"1-4,10"
)};
for
(
auto
i
=
0u
;
i
<
inputStrings
.
size
();
++
i
)
{
data
.
setSpectra
(
inputStrings
[
i
]);
TS_ASSERT
(
boost
::
apply_visitor
(
AreSpectraEqual
(),
data
.
spectra
(),
anwserSpectra
[
i
]));
}
}
void
test_data_is_stored_in_the_ADS
()
{
void
test_data_is_stored_in_the_ADS
()
{
auto
const
data
=
getIndirectFitData
(
1
,
3
);
auto
const
data
=
getIndirectFitData
(
1
,
3
);
SetUpADSWithWorkspace
ads
(
"WorkspaceName"
,
data
);
SetUpADSWithWorkspace
ads
(
"WorkspaceName"
,
data
);
...
...
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