testsuite: Make ztest_error_hook compatible with C++

This lets ztest error hooks be used from C++ based tests.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
This commit is contained in:
Benjamin Gwin 2022-06-21 16:28:29 -07:00 committed by Anas Nashif
commit ee22ae79a4

View file

@ -9,6 +9,9 @@
#include <zephyr/zephyr.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined(CONFIG_ZTEST_FATAL_HOOK)
/**
@ -68,6 +71,10 @@ void ztest_post_assert_fail_hook(void);
#endif
#ifdef __cplusplus
}
#endif
#if defined(CONFIG_ZTEST_FATAL_HOOK) || defined(CONFIG_ZTEST_ASSERT_HOOK)
#include <syscalls/ztest_error_hook.h>
#endif