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
6e9b9d03
Commit
6e9b9d03
authored
May 03, 2016
by
Davis King
Browse files
Improved macros
parent
707a6b4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dlib/test/tester.h
dlib/test/tester.h
+3
-3
No files found.
dlib/test/tester.h
View file @
6e9b9d03
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
#endif
#endif
#define DLIB_TEST(_exp) check_test(_exp, __LINE__, __FILE__, #_exp)
;
#define DLIB_TEST(_exp) check_test(_exp, __LINE__, __FILE__, #_exp)
#define DLIB_TEST_MSG(_exp,_message) \
#define DLIB_TEST_MSG(_exp,_message) \
{increment_test_count(); if ( !(_exp) ) \
do
{increment_test_count(); if ( !(_exp) ) \
{ \
{ \
std::ostringstream dlib_o_out; \
std::ostringstream dlib_o_out; \
dlib_o_out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib_o_out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
dlib_o_out << "Failing expression was " << #_exp << ".\n"; \
dlib_o_out << "Failing expression was " << #_exp << ".\n"; \
dlib_o_out << _message << "\n"; \
dlib_o_out << _message << "\n"; \
throw dlib::error(dlib_o_out.str()); \
throw dlib::error(dlib_o_out.str()); \
}}
}}
while(0)
namespace
test
namespace
test
{
{
...
...
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