Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
b4fdd9d5
Commit
b4fdd9d5
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm test
parent
2d9c02c0
No related branches found
No related tags found
1 merge request
!2003
In GUI, remove option to switch beteen nm and angstrom, degrees and radians.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tests/Unit/GUI/TestDetectorItems.cpp
+0
-28
0 additions, 28 deletions
Tests/Unit/GUI/TestDetectorItems.cpp
with
0 additions
and
28 deletions
Tests/Unit/GUI/TestDetectorItems.cpp
deleted
100644 → 0
+
0
−
28
View file @
2d9c02c0
#include
"Base/Const/Units.h"
#include
"Device/Detector/IDetector.h"
#include
"Device/Resolution/ConvolutionDetectorResolution.h"
#include
"Device/Resolution/ResolutionFunction2DGaussian.h"
#include
"GUI/Model/Detector/DetectorItem.h"
#include
"GUI/Model/Detector/ResolutionFunctionItems.h"
#include
"GUI/Model/Device/BackgroundItems.h"
#include
"GUI/Model/Device/InstrumentItems.h"
#include
"GUI/Model/Device/InstrumentModel.h"
#include
"GUI/Support/Type/Unit.h"
#include
"Tests/GTestWrapper/google_test.h"
TEST
(
TestDetectorItems
,
resolutionFunctionUnit
)
{
const
auto
asString
=
[](
const
std
::
variant
<
QString
,
Unit
>&
unit
)
{
return
std
::
holds_alternative
<
QString
>
(
unit
)
?
std
::
get
<
QString
>
(
unit
)
:
unitAsString
(
std
::
get
<
Unit
>
(
unit
));
};
DetectorItem
detector
;
detector
.
setResolutionFunctionType
<
ResolutionFunctionNoneItem
>
();
detector
.
setResolutionFunctionType
<
ResolutionFunction2DGaussianItem
>
();
auto
*
p
=
dynamic_cast
<
ResolutionFunction2DGaussianItem
*>
(
detector
.
resolutionFunctionSelection
().
currentItem
());
EXPECT_NE
(
p
,
nullptr
);
EXPECT_EQ
(
asString
(
p
->
sigmaX
().
unit
()),
"mm"
);
EXPECT_EQ
(
asString
(
p
->
sigmaY
().
unit
()),
"mm"
);
}
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