Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
ac778626
Commit
ac778626
authored
10 years ago
by
Jö Fahlke
Browse files
Options
Downloads
Patches
Plain Diff
[parametertreeparser][fs1523] Check that negative values are supported on the command line.
parent
ab16344b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/common/test/parametertreetest.cc
+16
-0
16 additions, 0 deletions
dune/common/test/parametertreetest.cc
with
16 additions
and
0 deletions
dune/common/test/parametertreetest.cc
+
16
−
0
View file @
ac778626
...
...
@@ -230,6 +230,21 @@ void testFS1527()
}
}
// check that negative values can be given on the command line
void
testFS1523
()
{
static
char
arg0
[]
=
"progname"
;
static
char
arg1
[]
=
"-setting"
;
static
char
arg2
[]
=
"-1"
;
static
char
*
argv
[]
=
{
arg0
,
arg1
,
arg2
,
NULL
};
int
argc
=
sizeof
argv
/
sizeof
(
char
*
)
-
1
;
Dune
::
ParameterTree
ptree
;
Dune
::
ParameterTreeParser
::
readOptions
(
argc
,
argv
,
ptree
);
check_assert
(
ptree
.
get
<
int
>
(
"setting"
)
==
-
1
);
}
int
main
()
{
try
{
...
...
@@ -262,6 +277,7 @@ int main()
// check for specific bugs
testFS1527
();
testFS1523
();
}
catch
(
Dune
::
Exception
&
e
)
{
...
...
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