From fb01c02230246b91694b9ef572a0462863c19349 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 25 Nov 2010 12:38:57 +0000 Subject: 2010-11-25 Sebastian Huber * spchain/init.c, spchain/spchain.scn: More test cases. --- testsuites/sptests/ChangeLog | 4 ++++ testsuites/sptests/spchain/init.c | 20 ++++++++++++++++++++ testsuites/sptests/spchain/spchain.scn | 2 ++ 3 files changed, 26 insertions(+) (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 02c9caeae5..95e2f2df2a 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,7 @@ +2010-11-25 Sebastian Huber + + * spchain/init.c, spchain/spchain.scn: More test cases. + 2010-11-24 Gedare Bloom PR 1647/cpukit diff --git a/testsuites/sptests/spchain/init.c b/testsuites/sptests/spchain/init.c index 9c853b772e..ba76ff853a 100644 --- a/testsuites/sptests/spchain/init.c +++ b/testsuites/sptests/spchain/init.c @@ -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); diff --git a/testsuites/sptests/spchain/spchain.scn b/testsuites/sptests/spchain/spchain.scn index c482d3f551..45db01f773 100644 --- a/testsuites/sptests/spchain/spchain.scn +++ b/testsuites/sptests/spchain/spchain.scn @@ -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 *** -- cgit v1.2.3