1 /*
2 * Copyright (c) 2016 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include "test_lifo.h"
8
9 #define TIMEOUT K_MSEC(100)
10
11 /*test cases*/
12 /**
13 * @addtogroup kernel_lifo_tests
14 * @{
15 */
16
17 /**
18 * @brief Test LIFO get fail
19 * @details verify zephyr k_lifo_get, it returns NULL
20 * when there is no data to read
21 * @see k_lifo_init(), k_lifo_get()
22 */
ZTEST(lifo_fail,test_lifo_get_fail)23 ZTEST(lifo_fail, test_lifo_get_fail)
24 {
25 static struct k_lifo lifo;
26
27 k_lifo_init(&lifo);
28 /**TESTPOINT: lifo get returns NULL*/
29 zassert_is_null(k_lifo_get(&lifo, K_NO_WAIT), NULL);
30 zassert_is_null(k_lifo_get(&lifo, TIMEOUT), NULL);
31 }
32
33 /**
34 * @}
35 */
36
37 ZTEST_SUITE(lifo_fail, NULL, NULL, NULL, NULL, NULL);
38