* spchain/init.c, spchain/spchain.scn: More test cases.
This commit is contained in:
Sebastian Huber
2010-11-25 12:38:57 +00:00
parent 76da5fa89d
commit fb01c02230
3 changed files with 26 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* spchain/init.c, spchain/spchain.scn: More test cases.
2010-11-24 Gedare Bloom <giddyup44@yahoo.com>
PR 1647/cpukit

View File

@@ -20,6 +20,24 @@ typedef struct {
int id;
} test_node;
static void test_chain_control_initializer(void)
{
rtems_chain_control chain = RTEMS_CHAIN_INITIALIZER_EMPTY( chain );
puts( "INIT - Verify rtems_chain_control initializer" );
rtems_test_assert( rtems_chain_is_empty( &chain ) );
}
static void test_chain_control_layout(void)
{
rtems_chain_control chain;
puts( "INIT - Verify rtems_chain_control layout" );
rtems_test_assert(
sizeof(rtems_chain_control)
== sizeof(rtems_chain_node) + sizeof(rtems_chain_node *)
);
rtems_test_assert( &chain.Head.Node.previous == &chain.Tail.Node.next );
}
static void test_chain_get_with_wait(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -158,6 +176,8 @@ rtems_task Init(
test_chain_with_empty_check();
test_chain_with_notification();
test_chain_get_with_wait();
test_chain_control_layout();
test_chain_control_initializer();
puts( "*** END OF RTEMS CHAIN API TEST ***" );
rtems_test_exit(0);

View File

@@ -8,4 +8,6 @@ INIT - Verify rtems_chain_append_with_notification
INIT - Verify rtems_chain_prepend_with_notification
INIT - Verify rtems_chain_get_with_notification
INIT - Verify rtems_chain_get_with_wait
INIT - Verify rtems_chain_control layout
INIT - Verify rtems_chain_control initializer
*** END OF RTEMS CHAIN API TEST ***