Zephyr Project API
3.1.0
A Scalable Open Source RTOS
ztest.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Intel Corporation
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
20
#ifndef ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_
21
#define ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_
22
27
#if !defined(CONFIG_ZTEST) && !defined(ZTEST_UNITTEST)
28
#error "You need to add CONFIG_ZTEST to your config file."
29
#endif
30
31
#ifndef KERNEL
32
#define CONFIG_STDOUT_CONSOLE 1
33
#define CONFIG_ZTEST_ASSERT_VERBOSE 1
34
#define CONFIG_ZTEST_MOCKING
35
#define CONFIG_NUM_COOP_PRIORITIES 16
36
#define CONFIG_COOP_ENABLED 1
37
#define CONFIG_PREEMPT_ENABLED 1
38
#define CONFIG_MP_NUM_CPUS 1
39
#define CONFIG_SYS_CLOCK_TICKS_PER_SEC 100
40
#define CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 10000000
41
#define CONFIG_SYS_CLOCK_MAX_TIMEOUT_DAYS 365
42
#define ARCH_STACK_PTR_ALIGN 8
43
/* FIXME: Properly integrate with Zephyr's arch specific code */
44
#define CONFIG_X86 1
45
#define CONFIG_PRINTK 1
46
#ifdef __cplusplus
47
extern
"C"
{
48
#endif
49
struct
esf;
50
typedef
struct
esf z_arch_esf_t;
51
#ifdef __cplusplus
52
}
53
#endif
54
#endif
/* KERNEL */
55
56
#include <
zephyr/sys/printk.h
>
57
#define PRINT printk
58
59
#include <
zephyr/zephyr.h
>
60
61
#include <
ztest_assert.h
>
62
#include <
ztest_mock.h
>
63
#include <
ztest_test.h
>
64
#include <tc_util.h>
65
66
#ifdef __cplusplus
67
extern
"C"
{
68
#endif
69
70
void
test_main
(
void
);
71
72
#ifdef __cplusplus
73
}
74
#endif
75
76
#endif
/* ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_ */
printk.h
zephyr.h
test_main
void test_main(void)
main entry point for thread runtime statistics (usage) test
Definition:
main.c:121
ztest_assert.h
Zephyr testing framework assertion macros.
ztest_mock.h
Ztest mocking support.
ztest_test.h
subsys
testsuite
ztest
include
ztest.h
Generated on Fri Oct 14 2022 07:25:59 for Zephyr Project API by
1.9.2