From 9d5f6005b58c1c52ab5a09255f05fcfdf00b26a4 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 9 Mar 2011 00:38:56 +0000 Subject: 2011-03-08 Joel Sherrill * spchain/init.c: Improve coverage testing. --- testsuites/sptests/ChangeLog | 4 ++++ testsuites/sptests/spchain/init.c | 13 +++++++++++++ 2 files changed, 17 insertions(+) (limited to 'testsuites/sptests') diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 29d27c6f49..a5f05f254d 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,7 @@ +2011-03-08 Joel Sherrill + + * spchain/init.c: Improve coverage testing. + 2011-02-22 Ralf Corsépius * configure.ac: Add AC_CONFIG_HEADER(config.h). diff --git a/testsuites/sptests/spchain/init.c b/testsuites/sptests/spchain/init.c index b40d619b68..6d20f769f5 100644 --- a/testsuites/sptests/spchain/init.c +++ b/testsuites/sptests/spchain/init.c @@ -76,6 +76,13 @@ static void test_chain_with_notification(void) rtems_test_assert( sc == RTEMS_SUCCESSFUL ); rtems_test_assert( p == &a ); + rtems_chain_initialize_empty( &chain ); + + rtems_chain_append( &chain, &b ); + sc = rtems_chain_append_with_notification( &chain, &a, rtems_task_self(), EVENT ); + rtems_test_assert( sc == RTEMS_SUCCESSFUL ); + rtems_test_assert( p == &a ); + puts( "INIT - Verify rtems_chain_prepend_with_notification" ); rtems_chain_initialize_empty( &chain ); sc = rtems_chain_prepend_with_notification( &chain, &a, rtems_task_self(), EVENT ); @@ -84,6 +91,12 @@ static void test_chain_with_notification(void) rtems_test_assert( sc == RTEMS_SUCCESSFUL ); rtems_test_assert( p == &a ); + rtems_chain_prepend( &chain, &b ); + sc = rtems_chain_prepend_with_notification( &chain, &a, rtems_task_self(), EVENT ); + rtems_test_assert( sc == RTEMS_SUCCESSFUL ); + rtems_test_assert( p == &a ); + + puts( "INIT - Verify rtems_chain_prepend_with_notification" ); puts( "INIT - Verify rtems_chain_get_with_notification" ); rtems_chain_initialize_empty( &chain ); -- cgit v1.2.3