summaryrefslogtreecommitdiff
path: root/tests/unit_tests/openvpn/mock_msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit_tests/openvpn/mock_msg.c')
-rw-r--r--tests/unit_tests/openvpn/mock_msg.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/unit_tests/openvpn/mock_msg.c b/tests/unit_tests/openvpn/mock_msg.c
index 060588f..eb0d5e9 100644
--- a/tests/unit_tests/openvpn/mock_msg.c
+++ b/tests/unit_tests/openvpn/mock_msg.c
@@ -29,12 +29,9 @@
#endif
#include <stdarg.h>
-#include <stddef.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
-#include <setjmp.h>
-#include <cmocka.h>
-
#include "errlevel.h"
#include "error.h"
@@ -73,8 +70,14 @@ x_msg(const unsigned int flags, const char *format, ...)
void
assert_failed(const char *filename, int line, const char *condition)
{
- mock_assert(false, condition ? condition : "", filename, line);
- /* Keep compiler happy. Should not happen, mock_assert() does not return */
+ if (condition)
+ {
+ printf("Assertion failed at %s:%d (%s)", filename, line, condition);
+ }
+ else
+ {
+ printf("Assertion failed at %s:%d", filename, line);
+ }
exit(1);
}