Ignore:
Timestamp:
Aug 10, 2016, 6:21:54 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
cac586e
Parents:
da15db78
git-author:
Sebastian Huber <sebastian.huber@…> (08/10/16 06:21:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/06/16 08:52:20)
Message:

score: Add _Chain_Initialize_one()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/spchain/init.c

    rda15db78 r3709987  
    1616
    1717const char rtems_test_name[] = "SPCHAIN";
     18
     19static void test_chain_init_one(void)
     20{
     21  Chain_Control chain;
     22  Chain_Node    node;
     23
     24  puts( "INIT - Verify _Chain_Initialize_one" );
     25
     26  _Chain_Initialize_node( &node );
     27  _Chain_Initialize_one( &chain, &node );
     28  rtems_test_assert( !_Chain_Is_empty( &chain ) );
     29  rtems_test_assert( !_Chain_Is_node_off_chain( &node ) );
     30  rtems_test_assert( _Chain_Is_first( &node ) );
     31  rtems_test_assert( _Chain_Is_last( &node ) );
     32  rtems_test_assert( _Chain_First( &chain ) == &node );
     33  rtems_test_assert( _Chain_Last( &chain ) == &node );
     34  rtems_test_assert( _Chain_Next( &node ) == _Chain_Tail( &chain ) );
     35  rtems_test_assert( _Chain_Previous( &node ) == _Chain_Head( &chain ) );
     36
     37  _Chain_Extract_unprotected( &node );
     38  rtems_test_assert( _Chain_Is_empty( &chain ) );
     39}
    1840
    1941static void update_registry_and_extract(
     
    480502  }
    481503
     504  test_chain_init_one();
    482505  test_chain_first_and_last();
    483506  test_chain_with_empty_check();
Note: See TracChangeset for help on using the changeset viewer.