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
f1a62bf8
Commit
f1a62bf8
authored
5 years ago
by
Matthew Andrew
Browse files
Options
Downloads
Patches
Plain Diff
Removed old test Re #26880
This set suite tested the old model which has now been replaced.
parent
46244025
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
qt/scientific_interfaces/Indirect/test/CMakeLists.txt
+0
-1
0 additions, 1 deletion
qt/scientific_interfaces/Indirect/test/CMakeLists.txt
qt/scientific_interfaces/Indirect/test/MSDFitModelTest.h
+0
-94
0 additions, 94 deletions
qt/scientific_interfaces/Indirect/test/MSDFitModelTest.h
with
0 additions
and
95 deletions
qt/scientific_interfaces/Indirect/test/CMakeLists.txt
+
0
−
1
View file @
f1a62bf8
...
...
@@ -24,7 +24,6 @@ set(
IqtFitModelTest.h
JumpFitDataPresenterTest.h
JumpFitModelTest.h
MSDFitModelTest.h
)
mtd_add_qt_tests
(
...
...
This diff is collapsed.
Click to expand it.
qt/scientific_interfaces/Indirect/test/MSDFitModelTest.h
deleted
100644 → 0
+
0
−
94
View file @
46244025
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#ifndef MANTIDQT_MSDFITMODELTEST_H_
#define MANTIDQT_MSDFITMODELTEST_H_
#include
<cxxtest/TestSuite.h>
#include
"MSDFitModel.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/FrameworkManager.h"
#include
"MantidAPI/MatrixWorkspace_fwd.h"
#include
"MantidTestHelpers/IndirectFitDataCreationHelper.h"
using
namespace
Mantid
::
API
;
using
namespace
Mantid
::
IndirectFitDataCreationHelper
;
using
namespace
MantidQt
::
CustomInterfaces
::
IDA
;
class
MSDFitModelTest
:
public
CxxTest
::
TestSuite
{
public:
/// WorkflowAlgorithms do not appear in the FrameworkManager without this line
MSDFitModelTest
()
{
FrameworkManager
::
Instance
();
}
static
MSDFitModelTest
*
createSuite
()
{
return
new
MSDFitModelTest
();
}
static
void
destroySuite
(
MSDFitModelTest
*
suite
)
{
delete
suite
;
}
void
setUp
()
override
{
m_workspace
=
createWorkspace
(
4
,
3
);
m_ads
=
std
::
make_unique
<
SetUpADSWithWorkspace
>
(
"Name"
,
m_workspace
);
m_model
=
std
::
make_unique
<
MSDFitModel
>
();
}
void
tearDown
()
override
{
AnalysisDataService
::
Instance
().
clear
();
m_ads
.
reset
();
m_workspace
.
reset
();
m_model
.
reset
();
}
void
test_that_the_model_is_instantiated_and_can_hold_a_workspace
()
{
Spectra
const
spectra
=
DiscontinuousSpectra
<
std
::
size_t
>
(
"0-1"
);
m_model
->
addWorkspace
(
m_workspace
,
spectra
);
TS_ASSERT_EQUALS
(
m_model
->
numberOfWorkspaces
(),
1
);
}
void
test_that_sequentialFitOutputName_returns_the_correct_name_which_uses_the_fit_string_set
()
{
Spectra
const
spectra
=
DiscontinuousSpectra
<
std
::
size_t
>
(
"0-1"
);
m_model
->
addWorkspace
(
m_workspace
,
spectra
);
m_model
->
setFitType
(
"Gaussian"
);
TS_ASSERT_EQUALS
(
m_model
->
sequentialFitOutputName
(),
"Name_MSDFit_Gaussian_s0-1_Results"
);
}
void
test_that_simultaneousFitOutputName_returns_the_correct_name_which_uses_the_fit_string_set
()
{
Spectra
const
spectra
=
DiscontinuousSpectra
<
std
::
size_t
>
(
"0-1"
);
m_model
->
addWorkspace
(
m_workspace
,
spectra
);
m_model
->
setFitType
(
"Gaussian"
);
TS_ASSERT_EQUALS
(
m_model
->
simultaneousFitOutputName
(),
"Name_MSDFit_Gaussian_s0-1_Results"
);
}
void
test_that_singleFitOutputName_returns_the_correct_name_which_uses_the_fit_string_set
()
{
Spectra
const
spectra
=
DiscontinuousSpectra
<
std
::
size_t
>
(
"0-1"
);
m_model
->
addWorkspace
(
m_workspace
,
spectra
);
m_model
->
setFitType
(
"Gaussian"
);
TS_ASSERT_EQUALS
(
m_model
->
singleFitOutputName
(
0
,
0
),
"Name_MSDFit_Gaussian_s0_Results"
);
}
void
test_that_getSpectrumDependentAttributes_returns_an_empty_vector
()
{
TS_ASSERT
(
m_model
->
getSpectrumDependentAttributes
().
empty
());
}
private
:
MatrixWorkspace_sptr
m_workspace
;
std
::
unique_ptr
<
SetUpADSWithWorkspace
>
m_ads
;
std
::
unique_ptr
<
MSDFitModel
>
m_model
;
};
#endif
/* MANTIDQT_MSDFITMODELTEST_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