Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
76a65c77
Commit
76a65c77
authored
Mar 19, 2019
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to give --no_ to exclude a unit test from --runall.
parent
eb686ec7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
main.cpp
dlib/test/main.cpp
+9
-4
No files found.
dlib/test/main.cpp
View file @
76a65c77
...
...
@@ -39,6 +39,8 @@ int main (int argc, char** argv)
{
tester
&
test
=
*
testers
().
element
().
value
();
parser
.
add_option
(
test
.
cmd_line_switch
(),
test
.
description
(),
test
.
num_of_args
());
if
(
test
.
num_of_args
()
==
0
)
parser
.
add_option
(
"no_"
+
test
.
cmd_line_switch
(),
"Don't run this option when using --runall."
);
}
parser
.
parse
(
argc
,
argv
);
...
...
@@ -117,10 +119,13 @@ int main (int argc, char** argv)
// run the test for this option as many times as the user has requested.
for
(
unsigned
long
j
=
0
;
j
<
parser
.
option
(
"runall"
).
count
()
+
opt
.
count
();
++
j
)
{
// quit this loop if this option has arguments and this round through the loop is
// from the runall option being present.
if
(
test
.
num_of_args
()
>
0
&&
j
==
opt
.
count
())
break
;
// If this round through the loop is from the runall option being present.
if
(
j
==
opt
.
count
())
{
// Don't run options that take arguments or have had --no_ applied to them.
if
(
test
.
num_of_args
()
>
0
||
parser
.
option
(
"no_"
+
test
.
cmd_line_switch
()))
break
;
}
if
(
be_verbose
)
cout
<<
"Running "
<<
test
.
cmd_line_switch
()
<<
" "
<<
flush
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment