Zephyr Project API  3.3.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 ARCH_STACK_PTR_ALIGN 8
33/* FIXME: Properly integrate with Zephyr's arch specific code */
34#ifdef __cplusplus
35extern "C" {
36#endif
37struct esf;
38typedef struct esf z_arch_esf_t;
39#ifdef __cplusplus
40}
41#endif
42#endif /* KERNEL */
43
44#include <zephyr/sys/printk.h>
45#define PRINT printk
46
47#include <zephyr/kernel.h>
48
49#include <zephyr/ztest_assert.h>
50#include <zephyr/ztest_mock.h>
51#include <zephyr/ztest_test.h>
52#include <zephyr/tc_util.h>
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
58void test_main(void);
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif /* ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_ */
Public kernel APIs.
void test_main(void)
Definition: main.c:9
Zephyr testing framework assertion macros.
Ztest mocking support.