test/test_util: Fix compilation when included from C++ code
test_util is implemented in C, so we need to use C linkage when calling
it from C++.
BRANCH=none
TEST=make buildall
#ifndef __CROS_EC_TEST_UTIL_H
#define __CROS_EC_TEST_UTIL_H
+#include "compile_time_macros.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "common.h"
#include "console.h"
#include "stack_trace.h"
@@ -484,4 +490,8 @@ void z_ztest_run_test_suite(const char *name, struct unit_test *suite);
TEST_ASSERT_ARRAY_EQ(buf, exp, size)
#endif /* CONFIG_ZEPHYR */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __CROS_EC_TEST_UTIL_H */
