1 /*
2  * Copyright (c) 2016 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "test_fifo.h"
8 
9 #define TIMEOUT K_MSEC(100)
10 
11 /**
12  * @addtogroup kernel_fifo_tests
13  * @{
14  */
15 
16 /**
17  * @brief Test FIFO get fail
18  * @details test zephyr fifo_get when no data to read,
19  * it should returns NULL.
20  * @see k_fifo_init(), k_fifo_get()
21  */
ZTEST(fifo_api,test_fifo_get_fail)22 ZTEST(fifo_api, test_fifo_get_fail)
23 {
24 	static struct k_fifo fifo;
25 
26 	k_fifo_init(&fifo);
27 	/**TESTPOINT: fifo get returns NULL*/
28 	zassert_is_null(k_fifo_get(&fifo, K_NO_WAIT), NULL);
29 	zassert_is_null(k_fifo_get(&fifo, TIMEOUT), NULL);
30 }
31 /**
32  * @}
33  */
34