Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb
Commits
8308d540
Commit
8308d540
authored
5 years ago
by
Victor Poughon
Browse files
Options
Downloads
Patches
Plain Diff
TEST: add a cpp test for bug
#1899
parent
8ee04571
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!621
Release 7.0 (master)
,
!497
Resolve "pipeline containing a BandMath failed"
Pipeline
#1424
passed
5 years ago
Stage: precheck
Stage: external
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/Wrappers/ApplicationEngine/test/otbWrapperInputImageParameterTest.cxx
+22
-4
22 additions, 4 deletions
...licationEngine/test/otbWrapperInputImageParameterTest.cxx
with
22 additions
and
4 deletions
Modules/Wrappers/ApplicationEngine/test/otbWrapperInputImageParameterTest.cxx
+
22
−
4
View file @
8308d540
...
...
@@ -22,17 +22,35 @@
#pragma warning ( disable : 4786 )
#endif
#include
"otbImage.h"
#include
"otbWrapperInputImageParameter.h"
int
otbWrapperInputImageParameterTest1
(
int
itkNotUsed
(
argc
)
,
char
*
argv
[])
int
otbWrapperInputImageParameterTest1
(
int
,
char
*
argv
[])
{
typedef
otb
::
Wrapper
::
InputImageParameter
InputImageParameterType
;
InputImageParameterType
::
Pointer
param
=
InputImageParameterType
::
New
();
auto
param
=
otb
::
Wrapper
::
InputImageParameter
::
New
();
param
->
SetFromFileName
(
argv
[
1
]);
param
->
SetKey
(
argv
[
2
]);
param
->
SetDescription
(
argv
[
3
]);
/*
Originally reported on gitlab as bug #1899:
https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/issues/1899
*/
using
ImageType
=
otb
::
Image
<
float
,
2
>
;
using
ImageTypeOutput
=
otb
::
Image
<
unsigned
char
,
2
>
;
auto
image
=
ImageType
::
New
();
param
->
SetImage
(
image
.
GetPointer
());
auto
output1
=
param
->
GetImage
<
ImageTypeOutput
>
();
auto
output2
=
param
->
GetImage
<
ImageTypeOutput
>
();
if
(
output1
!=
output2
)
{
std
::
cerr
<<
"InputImageParameter calls to ->GetImage<> are not consistent.
\n
"
;
return
EXIT_FAILURE
;
}
return
EXIT_SUCCESS
;
}
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