Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
28328af5
Commit
28328af5
authored
Feb 03, 2022
by
Davis King
Browse files
Make -q on tests print errors
parent
ffca3b3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
dlib/test/main.cpp
dlib/test/main.cpp
+10
-16
No files found.
dlib/test/main.cpp
View file @
28328af5
...
@@ -29,7 +29,7 @@ int main (int argc, char** argv)
...
@@ -29,7 +29,7 @@ int main (int argc, char** argv)
parser
.
add_option
(
"d"
,
"log debugging statements to file debug.txt."
);
parser
.
add_option
(
"d"
,
"log debugging statements to file debug.txt."
);
parser
.
add_option
(
"l"
,
"Set the logging level (all, trace, debug, info, warn, error, or fatal), the default is all."
,
1
);
parser
.
add_option
(
"l"
,
"Set the logging level (all, trace, debug, info, warn, error, or fatal), the default is all."
,
1
);
parser
.
add_option
(
"a"
,
"Append debugging messages to debug.txt rather than clearing the file at program startup."
);
parser
.
add_option
(
"a"
,
"Append debugging messages to debug.txt rather than clearing the file at program startup."
);
parser
.
add_option
(
"q"
,
"Be quiet. Don't print the testing progress or results to standard out."
);
parser
.
add_option
(
"q"
,
"Be quiet. Don't print the testing progress or
non-failure
results to standard out."
);
unsigned
long
num
=
1
;
unsigned
long
num
=
1
;
...
@@ -158,15 +158,12 @@ int main (int argc, char** argv)
...
@@ -158,15 +158,12 @@ int main (int argc, char** argv)
}
}
catch
(
std
::
exception
&
e
)
catch
(
std
::
exception
&
e
)
{
if
(
be_verbose
)
{
{
cout
<<
"
\n\n
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\n
"
;
cout
<<
"
\n\n
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\n
"
;
cout
<<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!! TEST FAILED: "
<<
test
.
cmd_line_switch
()
cout
<<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!! TEST FAILED: "
<<
test
.
cmd_line_switch
()
<<
" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
;
<<
" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
;
cout
<<
"
\n
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\n\n
"
;
cout
<<
"
\n
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\n\n
"
;
cout
<<
"Failure message from test: "
<<
e
.
what
()
<<
endl
;
cout
<<
"Failure message from test: "
<<
e
.
what
()
<<
endl
;
}
dlog
<<
LERROR
<<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
;
dlog
<<
LERROR
<<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
;
...
@@ -197,14 +194,11 @@ int main (int argc, char** argv)
...
@@ -197,14 +194,11 @@ int main (int argc, char** argv)
dlog
<<
LINFO
<<
"All tests completed successfully"
;
dlog
<<
LINFO
<<
"All tests completed successfully"
;
}
}
else
else
{
if
(
be_verbose
)
{
{
cout
<<
"
\n\n
Testing Finished
\n
"
;
cout
<<
"
\n\n
Testing Finished
\n
"
;
cout
<<
"Total number of individual testing statements executed: "
<<
number_of_testing_statements_executed
()
<<
endl
;
cout
<<
"Total number of individual testing statements executed: "
<<
number_of_testing_statements_executed
()
<<
endl
;
cout
<<
"Number of failed tests: "
<<
num_of_failed_tests
<<
"
\n
"
;
cout
<<
"Number of failed tests: "
<<
num_of_failed_tests
<<
"
\n
"
;
cout
<<
"Number of passed tests: "
<<
num_of_passed_tests
<<
"
\n\n
"
;
cout
<<
"Number of passed tests: "
<<
num_of_passed_tests
<<
"
\n\n
"
;
}
dlog
<<
LINFO
<<
"Total number of individual testing statements executed: "
<<
number_of_testing_statements_executed
();
dlog
<<
LINFO
<<
"Total number of individual testing statements executed: "
<<
number_of_testing_statements_executed
();
dlog
<<
LWARN
<<
"Number of failed tests: "
<<
num_of_failed_tests
;
dlog
<<
LWARN
<<
"Number of failed tests: "
<<
num_of_failed_tests
;
dlog
<<
LWARN
<<
"Number of passed tests: "
<<
num_of_passed_tests
;
dlog
<<
LWARN
<<
"Number of passed tests: "
<<
num_of_passed_tests
;
...
...
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