76 assert_ptr_equal(lstack, NULL);
104 assert_ptr_equal(
it1.
next, NULL);
105 assert_ptr_equal(
it1.
prev, NULL);
108 assert_ptr_equal(
it1.
prev, NULL);
109 assert_ptr_equal(
it2.
next, NULL);
113 assert_ptr_equal(
it1.
prev, NULL);
116 assert_ptr_equal(
it3.
next, NULL);
120 assert_ptr_equal(
it1.
next, NULL);
121 assert_ptr_equal(
it1.
prev, NULL);
122 assert_ptr_equal(
it2.
next, NULL);
123 assert_ptr_equal(
it2.
prev, NULL);
124 assert_ptr_equal(
it3.
next, NULL);
125 assert_ptr_equal(
it3.
prev, NULL);
144 assert_ptr_equal(
it3.
next, NULL);
145 assert_ptr_equal(
it3.
prev, NULL);
147 assert_ptr_equal(
it2.
next, NULL);
148 assert_ptr_equal(
it2.
prev, NULL);
150 assert_ptr_equal(
it1.
next, NULL);
151 assert_ptr_equal(
it1.
prev, NULL);
Ambiorix linked stack API header file.
AMXC_INLINE void amxc_lstack_clean(amxc_lstack_t *const lstack, amxc_lstack_it_delete_t func)
Removes all items from the linked stack.
AMXC_INLINE int amxc_lstack_init(amxc_lstack_t *const lstack)
Initializes a linked stack.
AMXC_INLINE int amxc_lstack_push(amxc_lstack_t *const lstack, amxc_lstack_it_t *const it)
Adds an item to the linked stack.
AMXC_INLINE amxc_lstack_it_t * amxc_lstack_pop(amxc_lstack_t *const lstack)
Removes the last added item from the stack.
AMXC_INLINE int amxc_lstack_new(amxc_lstack_t **lstack)
Allocates a linked stack.
AMXC_INLINE int amxc_lstack_it_init(amxc_lstack_it_t *const it)
Initializes a linked stack iterator.
AMXC_INLINE void amxc_lstack_delete(amxc_lstack_t **lstack, amxc_lstack_it_delete_t func)
Frees the previously allocated linked stack.
The linked list iterator structure.
struct _amxc_llist_it * next
struct _amxc_llist_it * prev
The linked list structure.
static amxc_llist_it_t it3
static amxc_llist_it_t it2
static amxc_llist_it_t it1
void amxc_lstack_init_clean_check(UNUSED void **state)
void amxc_lstack_push_check(UNUSED void **state)
void amxc_lstack_new_delete_null_check(UNUSED void **state)
void amxc_lstack_init_clean_null_check(UNUSED void **state)
void amxc_lstack_pop_check(UNUSED void **state)
void amxc_lstack_new_delete_check(UNUSED void **state)