Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
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
13#ifndef ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_
14#define ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_
15
21#if !defined(CONFIG_ZTEST) && !defined(ZTEST_UNITTEST)
22#error "You need to add CONFIG_ZTEST to your config file."
23#endif
24
25#ifndef KERNEL
26#define ARCH_STACK_PTR_ALIGN 8
27/* FIXME: Properly integrate with Zephyr's arch specific code */
28#ifdef __cplusplus
29extern "C" {
30#endif
31struct esf;
32typedef struct esf z_arch_esf_t;
33#ifdef __cplusplus
34}
35#endif
36#endif /* KERNEL */
37
38#include <zephyr/sys/printk.h>
39#define PRINT printk
40
41#include <zephyr/kernel.h>
42
43#include <zephyr/ztest_assert.h>
44#include <zephyr/ztest_mock.h>
45#include <zephyr/ztest_test.h>
46#include <zephyr/tc_util.h>
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52void test_main(void);
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif /* ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_ */
Public kernel APIs.
void test_main(void)
Zephyr testing framework assertion macros.
Ztest mocking support.
Zephyr testing framework _test.