Changeset b431b66 in rtems


Ignore:
Timestamp:
Nov 26, 2011, 6:07:52 PM (8 years ago)
Author:
Gedare Bloom <gedare@…>
Branches:
4.11, master
Children:
e3a1488a
Parents:
f11d5a42
Message:

2011-11-26 Gedare Bloom <gedare@…>

PR 1964

  • spchain/init.c, spchain/spchain.scn: Add testcases for chain is first and last
Location:
testsuites/sptests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    rf11d5a42 rb431b66  
     12011-11-26      Gedare Bloom <gedare@rtems.org>
     2
     3        PR 1964
     4        * spchain/init.c, spchain/spchain.scn: Add testcases for chain is first
     5        and last
     6
    172011-11-10      Sebastian Huber <sebastian.huber@embedded-brains.de>
    28
  • testsuites/sptests/spchain/init.c

    rf11d5a42 rb431b66  
    5858  rtems_test_assert( sc == RTEMS_TIMEOUT );
    5959  rtems_test_assert( p == NULL );
     60}
     61
     62static void test_chain_first_and_last(void)
     63{
     64  rtems_chain_control   chain;
     65  rtems_chain_node      node1, node2;
     66  rtems_chain_node     *cnode;
     67
     68  rtems_chain_initialize_empty( &chain );
     69  rtems_chain_append( &chain, &node1 );
     70  rtems_chain_insert( &node1, &node2 );
     71
     72  puts( "INIT - Verify rtems_chain_is_first" );
     73  cnode = rtems_chain_first(&chain); 
     74  rtems_test_assert( rtems_chain_is_first( cnode ) );
     75
     76  puts( "INIT - Verify rtems_chain_is_last" );
     77  cnode = rtems_chain_last(&chain);
     78  rtems_test_assert( rtems_chain_is_last( cnode ) );
    6079}
    6180
     
    215234  }
    216235
     236  test_chain_first_and_last();
    217237  test_chain_with_empty_check();
    218238  test_chain_with_notification();
  • testsuites/sptests/spchain/spchain.scn

    rf11d5a42 rb431b66  
    22Init - Initialize chain empty
    33INIT - Verify rtems_chain_insert
     4INIT - Verify rtems_chain_is_first
     5INIT - Verify rtems_chain_is_last
    46INIT - Verify rtems_chain_append_with_empty_check
    57INIT - Verify rtems_chain_prepend_with_empty_check
Note: See TracChangeset for help on using the changeset viewer.