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:
parent
d1d5acd2cd
commit
ee22ae79a4
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue