zephyr/tests/kernel/queue/src/test_queue_fail.c
Kumar Gala c7bc909914 tests/ztest: rename assert macros to be zephyr specific
ztest has a number of assert style macros and used a baseline assert()
that varies from the system definition of assert() so lets rename
everything as zassert to be clear.

Change-Id: I7f176b3bae94d1045054d665be8b5bda947e5bb0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-13 21:17:33 +00:00

33 lines
625 B
C

/*
* Copyright (c) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @addtogroup t_queue_api
* @{
* @defgroup t_queue_get_fail test_queue_get_fail
* @brief TestPurpose: verify zephyr queue_get when no data
* - API coverage
* -# k_queue_init
* -# k_queue_get
* @}
*/
#include "test_queue.h"
#define TIMEOUT 100
/*test cases*/
void test_queue_get_fail(void *p1, void *p2, void *p3)
{
struct k_queue queue;
k_queue_init(&queue);
/**TESTPOINT: queue get returns NULL*/
zassert_is_null(k_queue_get(&queue, K_NO_WAIT), NULL);
zassert_is_null(k_queue_get(&queue, TIMEOUT), NULL);
}