ztest: define test_main in the header file.
This also makes test_main C++ compatible by setting the linkage. Signed-off-by: Michael Hope <mlhx@google.com>
This commit is contained in:
parent
7383814d8b
commit
d2807576ec
|
@ -13,6 +13,10 @@
|
|||
#ifndef __ZTEST_H__
|
||||
#define __ZTEST_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup ztest Zephyr testing suite
|
||||
*/
|
||||
|
@ -49,4 +53,10 @@
|
|||
#include <tc_util.h>
|
||||
#include <logging/sys_log.h>
|
||||
|
||||
void test_main(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ZTEST_H__ */
|
||||
|
|
|
@ -259,8 +259,6 @@ void _ztest_run_test_suite(const char *name, struct unit_test *suite)
|
|||
test_status = (test_status || fail) ? 1 : 0;
|
||||
}
|
||||
|
||||
void test_main(void);
|
||||
|
||||
#ifndef KERNEL
|
||||
int main(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue