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
335a6840
Commit
335a6840
authored
6 years ago
by
Victor Poughon
Browse files
Options
Downloads
Patches
Plain Diff
TEST: relax ApplicationDocTests (allow empty limitations and seealso)
parent
430870f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!621
Release 7.0 (master)
,
!316
Christmas CookBook
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/Applications/AppTest/test/otbWrapperApplicationDocTests.cxx
+1
-35
1 addition, 35 deletions
...plications/AppTest/test/otbWrapperApplicationDocTests.cxx
with
1 addition
and
35 deletions
Modules/Applications/AppTest/test/otbWrapperApplicationDocTests.cxx
+
1
−
35
View file @
335a6840
...
...
@@ -62,33 +62,6 @@ bool CheckNoNewline(const DocElement & elem)
return
ret
;
}
bool
CheckNoTrailingNewline
(
const
DocElement
&
elem
)
{
bool
ret
=
true
;
std
::
string
whitespace
(
"
\t\f\v\r
"
);
size_t
pos
=
elem
.
second
.
find_last_not_of
(
whitespace
);
if
(
pos
!=
std
::
string
::
npos
&&
elem
.
second
.
at
(
pos
)
==
'\n'
)
{
std
::
cout
<<
" /!
\\
"
<<
elem
.
first
<<
" should not end with a newline"
<<
std
::
endl
;
ret
=
false
;
}
return
ret
;
}
bool
CheckMultiline
(
const
DocElement
&
elem
)
{
bool
ret
=
true
;
std
::
string
whitespace
(
"
\t\f\v\r
"
);
size_t
pos
=
elem
.
second
.
find
(
'\n'
);
size_t
lastPos
=
elem
.
second
.
find_last_not_of
(
whitespace
);
if
(
pos
==
std
::
string
::
npos
||
pos
==
lastPos
)
{
std
::
cout
<<
" /!
\\
"
<<
elem
.
first
<<
" should not be a single line"
<<
std
::
endl
;
ret
=
false
;
}
return
ret
;
}
int
otbWrapperApplicationDocTest
(
int
argc
,
char
*
argv
[])
{
if
(
argc
<
2
)
...
...
@@ -149,16 +122,9 @@ int otbWrapperApplicationDocTest(int argc, char* argv[])
isOK
=
CheckNonEmpty
(
longDescription
)
&&
isOK
;
isOK
=
CheckMinimumSize
(
longDescription
,
30
)
&&
isOK
;
isOK
=
CheckNoTrailingNewline
(
longDescription
)
&&
isOK
;
//isOK = CheckMultiline(longDescription) && isOK;
isOK
=
CheckNonEmpty
(
authors
)
&&
isOK
;
isOK
=
CheckNonEmpty
(
limitations
)
&&
isOK
;
isOK
=
CheckNonEmpty
(
seeAlso
)
&&
isOK
;
// TODO : check format of SeeAlso section
if
(
app
->
GetDocTags
().
size
()
==
0
)
{
std
::
cout
<<
"Missing DocTags."
<<
std
::
endl
;
...
...
@@ -170,7 +136,7 @@ int otbWrapperApplicationDocTest(int argc, char* argv[])
otb
::
Wrapper
::
DocExampleStructure
::
Pointer
doc
=
app
->
GetDocExample
();
if
(
doc
->
GetApplicationName
()
==
""
)
{
std
::
cout
<<
"Error in doc example: no a
a
plication name found."
<<
std
::
endl
;
std
::
cout
<<
"Error in doc example: no a
p
plication name found."
<<
std
::
endl
;
isOK
=
false
;
}
if
(
doc
->
GetParameterList
().
size
()
==
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