diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-11-25 12:38:57 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-11-25 12:38:57 +0000 |
commit | fb01c02230246b91694b9ef572a0462863c19349 (patch) | |
tree | 65c776636dd2ed2b46ab096c4608e0e2c30ed68f | |
parent | 2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-fb01c02230246b91694b9ef572a0462863c19349.tar.bz2 |
2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* spchain/init.c, spchain/spchain.scn: More test cases.
-rw-r--r-- | testsuites/sptests/ChangeLog | 4 | ||||
-rw-r--r-- | testsuites/sptests/spchain/init.c | 20 | ||||
-rw-r--r-- | testsuites/sptests/spchain/spchain.scn | 2 |
3 files changed, 26 insertions, 0 deletions
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 <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 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 *** |