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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
David Youssefi
otb
Commits
1e77e32f
Commit
1e77e32f
authored
14 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
TEST: increase coverage for WriterWatcher
parent
353addc7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Testing/Code/Common/otbStandardWriterWatcher.cxx
+30
-6
30 additions, 6 deletions
Testing/Code/Common/otbStandardWriterWatcher.cxx
with
30 additions
and
6 deletions
Testing/Code/Common/otbStandardWriterWatcher.cxx
+
30
−
6
View file @
1e77e32f
...
@@ -50,13 +50,14 @@ int otbStandardWriterWatcher(int argc, char * argv[])
...
@@ -50,13 +50,14 @@ int otbStandardWriterWatcher(int argc, char * argv[])
writer1
->
SetInput
(
gradient
->
GetOutput
());
writer1
->
SetInput
(
gradient
->
GetOutput
());
writer1
->
SetFileName
(
outfname
);
writer1
->
SetFileName
(
outfname
);
otb
::
StandardWriterWatcher
watcher1
(
writer1
,
"Gradient (streaming)"
);
typedef
otb
::
StandardWriterWatcher
WatcherType
;
WatcherType
watcher1
(
writer1
,
"Gradient (streaming)"
);
otb
::
StandardWriterWatcher
watcher3
(
writer1
,
gradient
,
"Gradient"
);
//
otb::StandardWriterWatcher watcher3(writer1, gradient, "Gradient");
//
otb
::
StandardWriterWatcher
watcher4
(
watcher1
);
//
otb::StandardWriterWatcher watcher4(watcher1);
//
otb
::
StandardWriterWatcher
watcher5
=
watcher1
;
//
otb::StandardWriterWatcher watcher5 = watcher1;
writer1
->
Update
();
writer1
->
Update
();
...
@@ -67,5 +68,28 @@ int otbStandardWriterWatcher(int argc, char * argv[])
...
@@ -67,5 +68,28 @@ int otbStandardWriterWatcher(int argc, char * argv[])
otb
::
StandardWriterWatcher
watcher2
(
writer2
,
"Gradient (non streaming)"
);
otb
::
StandardWriterWatcher
watcher2
(
writer2
,
"Gradient (non streaming)"
);
writer2
->
Update
();
writer2
->
Update
();
// Test copy constructor.
WatcherType
watcher3
(
watcher1
);
if
(
watcher1
.
GetNameOfClass
()
!=
watcher3
.
GetNameOfClass
()
||
watcher1
.
GetProcess
()
!=
watcher3
.
GetProcess
()
||
watcher1
.
GetComment
()
!=
watcher3
.
GetComment
()
)
{
std
::
cout
<<
"Copy constructor failed."
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
// Test default constructor.
WatcherType
watcher4
;
// Test assignment operator.
watcher4
=
watcher3
;
if
(
watcher4
.
GetNameOfClass
()
!=
watcher3
.
GetNameOfClass
()
||
watcher4
.
GetProcess
()
!=
watcher3
.
GetProcess
()
||
watcher4
.
GetComment
()
!=
watcher3
.
GetComment
()
)
{
std
::
cout
<<
"Operator= failed."
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
return
EXIT_SUCCESS
;
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