Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
47extern "C" {
48#endif
49struct esf;
50typedef struct esf z_arch_esf_t;
51#ifdef __cplusplus
52}
53#endif
54#endif /* KERNEL */
55
56#include <sys/printk.h>
57#define PRINT printk
58
59#include <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
67extern "C" {
68#endif
69
70void test_main(void);
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif /* ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_ */
void test_main(void)
Definition: main.c:120
Zephyr testing framework assertion macros.
Ztest mocking support.