Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
radler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ResearchAndDevelopment
radler
Commits
203f8637
Commit
203f8637
authored
3 years ago
by
Jakob Maljaars
Browse files
Options
Downloads
Patches
Plain Diff
AST-896
test multiscale algorithm for simple point source
parent
1b5ccdce
Branches
Branches containing commit
No related tags found
1 merge request
!32
AST-896 test multiscale algorithm for simple point source
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpp/test/test_radler.cc
+42
-2
42 additions, 2 deletions
cpp/test/test_radler.cc
with
42 additions
and
2 deletions
cpp/test/test_radler.cc
+
42
−
2
View file @
203f8637
...
...
@@ -2,15 +2,43 @@
#include
"radler.h"
#include
<array>
#include
<cassert>
#include
<boost/test/unit_test.hpp>
#include
<boost/test/data/test_case.hpp>
#include
<aocommon/image.h>
#include
"settings.h"
namespace
radler
{
/**
* @brief Boost customization point for logging. See:
* https://www.boost.org/doc/libs/1_64_0/libs/test/doc/html/boost_test/test_output/test_tools_support_for_logging/testing_tool_output_disable.html
*/
std
::
ostream
&
boost_test_print_type
(
std
::
ostream
&
stream
,
const
AlgorithmType
&
algorithm_type
)
{
switch
(
algorithm_type
)
{
case
AlgorithmType
::
kGenericClean
:
stream
<<
"Generic clean"
;
break
;
case
AlgorithmType
::
kMultiscale
:
stream
<<
"Multiscale clean"
;
break
;
case
AlgorithmType
::
kMoreSane
:
stream
<<
"More sane clean"
;
break
;
case
AlgorithmType
::
kIuwt
:
stream
<<
"Iuwt clean"
;
break
;
case
AlgorithmType
::
kPython
:
stream
<<
"Python based deconvolver"
;
break
;
}
return
stream
;
}
namespace
{
const
std
::
size_t
kWidth
=
64
;
const
std
::
size_t
kHeight
=
64
;
...
...
@@ -61,9 +89,18 @@ struct SettingsFixture {
Settings
settings
;
};
std
::
array
<
AlgorithmType
,
2
>
kAlgorithmTypes
{
AlgorithmType
::
kGenericClean
,
AlgorithmType
::
kMultiscale
,
/* Fails AlgorithmType::kIuwt */
};
BOOST_AUTO_TEST_SUITE
(
radler
)
BOOST_FIXTURE_TEST_CASE
(
centered_source
,
SettingsFixture
)
{
BOOST_DATA_TEST_CASE_F
(
SettingsFixture
,
centered_source
,
boost
::
unit_test
::
data
::
make
(
kAlgorithmTypes
),
algorithm_type
)
{
settings
.
algorithm_type
=
algorithm_type
;
aocommon
::
Image
psf_image
(
kWidth
,
kHeight
);
aocommon
::
Image
residual_image
(
kWidth
,
kHeight
);
aocommon
::
Image
model_image
(
kWidth
,
kHeight
,
0.0
);
...
...
@@ -88,7 +125,10 @@ BOOST_FIXTURE_TEST_CASE(centered_source, SettingsFixture) {
}
}
BOOST_FIXTURE_TEST_CASE
(
offcentered_source
,
SettingsFixture
)
{
BOOST_DATA_TEST_CASE_F
(
SettingsFixture
,
offcentered_source
,
boost
::
unit_test
::
data
::
make
(
kAlgorithmTypes
),
algorithm_type
)
{
settings
.
algorithm_type
=
algorithm_type
;
aocommon
::
Image
psf_image
(
kWidth
,
kHeight
);
aocommon
::
Image
residual_image
(
kWidth
,
kHeight
);
aocommon
::
Image
model_image
(
kWidth
,
kHeight
,
0.0
);
...
...
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