Commit 627d6552 authored by Neverlord's avatar Neverlord

No longer log unit test output

parent 257b210b
...@@ -40,7 +40,6 @@ void caf_unexpected_timeout(const char* file, size_t line); ...@@ -40,7 +40,6 @@ void caf_unexpected_timeout(const char* file, size_t line);
caf_strip_path(fname) << ":" << caf_fill4(line) << " " << message caf_strip_path(fname) << ":" << caf_fill4(line) << " " << message
#define CAF_PRINTC(filename, line, message) \ #define CAF_PRINTC(filename, line, message) \
CAF_LOGF_INFO(CAF_STREAMIFY(filename, line, message)); \
{ \ { \
std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \ std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \
std::cout << CAF_STREAMIFY(filename, line, message) << std::endl; \ std::cout << CAF_STREAMIFY(filename, line, message) << std::endl; \
...@@ -49,22 +48,12 @@ void caf_unexpected_timeout(const char* file, size_t line); ...@@ -49,22 +48,12 @@ void caf_unexpected_timeout(const char* file, size_t line);
#define CAF_PRINT(message) CAF_PRINTC(__FILE__, __LINE__, message) #define CAF_PRINT(message) CAF_PRINTC(__FILE__, __LINE__, message)
#if defined(CAF_LOG_LEVEL) && CAF_LOG_LEVEL > 1 #define CAF_PRINTERRC(fname, line, msg) \
# define CAF_PRINTERRC(fname, line, msg) \ { \
CAF_LOGF_ERROR(CAF_STREAMIFY(fname, line, msg)); \ std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \
{ \ std::cerr << "ERROR: " << CAF_STREAMIFY(fname, line, msg) << std::endl; \
std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \ } \
std::cerr << "ERROR: " << CAF_STREAMIFY(fname, line, msg) << std::endl; \ caf_inc_error_count();
} \
caf_inc_error_count()
#else
# define CAF_PRINTERRC(fname, line, msg) \
{ \
std::lock_guard<std::mutex> guard{caf_stdout_mtx()}; \
std::cerr << "ERROR: " << CAF_STREAMIFY(fname, line, msg) << std::endl; \
} \
caf_inc_error_count();
#endif
#define CAF_PRINTERR(message) CAF_PRINTERRC(__FILE__, __LINE__, message) #define CAF_PRINTERR(message) CAF_PRINTERRC(__FILE__, __LINE__, message)
......
...@@ -77,13 +77,6 @@ int main() { ...@@ -77,13 +77,6 @@ int main() {
test_unpublish(); test_unpublish();
await_all_actors_done(); await_all_actors_done();
shutdown(); shutdown();
// we cannot use CAF_CHECK_EQUAL here because it will also log CAF_CHECK_EQUAL(s_dtor_called.load(), 2);
// an error (logger has been destroyed in shutdown)
auto dtors_called = s_dtor_called.load();
if (s_dtor_called.load() != 2) {
std::cerr << "ERROR: " << caf_strip_path(__FILE__) << ":" << __LINE__
<< " expected value: 2, found: " << dtors_called << std::endl;
caf_inc_error_count();
}
return CAF_TEST_RESULT(); return CAF_TEST_RESULT();
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment