Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
412b8ac9
Commit
412b8ac9
authored
Feb 17, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase error count when using CAF_PRINTERR
parent
44de1c92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
unit_testing/test.hpp
unit_testing/test.hpp
+4
-7
No files found.
unit_testing/test.hpp
View file @
412b8ac9
...
@@ -56,14 +56,14 @@ void caf_unexpected_timeout(const char* file, size_t line);
...
@@ -56,14 +56,14 @@ void caf_unexpected_timeout(const char* file, size_t line);
std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \
std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \
std::cerr << "ERROR: " << CAF_STREAMIFY(fname, line, msg) << std::endl; \
std::cerr << "ERROR: " << CAF_STREAMIFY(fname, line, msg) << std::endl; \
} \
} \
static_cast<void>(0
)
caf_inc_error_count(
)
#else
#else
# define CAF_PRINTERRC(fname, line, msg) \
# define CAF_PRINTERRC(fname, line, msg) \
{ \
{ \
std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \
std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \
std::cerr << "ERROR: " << CAF_STREAMIFY(fname, line, msg) << std::endl; \
std::cerr << "ERROR: " << CAF_STREAMIFY(fname, line, msg) << std::endl; \
} \
} \
static_cast<void>(0)
caf_inc_error_count();
#endif
#endif
#define CAF_PRINTERR(message) CAF_PRINTERRC(__FILE__, __LINE__, message)
#define CAF_PRINTERR(message) CAF_PRINTERRC(__FILE__, __LINE__, message)
...
@@ -106,9 +106,8 @@ template <class V1, typename V2>
...
@@ -106,9 +106,8 @@ template <class V1, typename V2>
inline
void
caf_failed
(
const
V1
&
v1
,
const
V2
&
v2
,
const
char
*
fname
,
inline
void
caf_failed
(
const
V1
&
v1
,
const
V2
&
v2
,
const
char
*
fname
,
size_t
line_number
)
{
size_t
line_number
)
{
CAF_PRINTERRC
(
fname
,
line_number
,
CAF_PRINTERRC
(
fname
,
line_number
,
"expected value: "
<<
caf_stream_arg
(
v2
)
"expected value: "
<<
caf_stream_arg
(
v2
)
<<
", found: "
<<
caf_stream_arg
(
v1
));
<<
", found: "
<<
caf_stream_arg
(
v1
));
caf_inc_error_count
();
}
}
inline
void
caf_check_value
(
const
std
::
string
&
v1
,
const
std
::
string
&
v2
,
inline
void
caf_check_value
(
const
std
::
string
&
v1
,
const
std
::
string
&
v2
,
...
@@ -174,7 +173,6 @@ inline void caf_check_value(V1 v1, V2 v2, const char* fname, size_t line,
...
@@ -174,7 +173,6 @@ inline void caf_check_value(V1 v1, V2 v2, const char* fname, size_t line,
#define CAF_CHECK(line_of_code) \
#define CAF_CHECK(line_of_code) \
if (!(line_of_code)) { \
if (!(line_of_code)) { \
CAF_PRINTERR(#line_of_code); \
CAF_PRINTERR(#line_of_code); \
caf_inc_error_count(); \
} else { \
} else { \
CAF_PRINT("passed"); \
CAF_PRINT("passed"); \
} \
} \
...
@@ -189,7 +187,6 @@ inline void caf_check_value(V1 v1, V2 v2, const char* fname, size_t line,
...
@@ -189,7 +187,6 @@ inline void caf_check_value(V1 v1, V2 v2, const char* fname, size_t line,
#define CAF_FAILURE(err_msg) \
#define CAF_FAILURE(err_msg) \
{ \
{ \
CAF_PRINTERR("ERROR: " << err_msg); \
CAF_PRINTERR("ERROR: " << err_msg); \
caf_inc_error_count(); \
} \
} \
static_cast<void>(0)
static_cast<void>(0)
...
...
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