Changeset c30fcf52 in rtems


Ignore:
Timestamp:
Jun 5, 2009, 10:17:52 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
5cb7096
Parents:
b360885
Message:

2009-06-05 Santosh G Vattam <vattam.santosh@…>

  • heapwalk/heapwalk.scn, heapwalk/init.c: Add a test case.
Location:
testsuites/libtests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/ChangeLog

    rb360885 rc30fcf52  
     12009-06-05      Santosh G Vattam <vattam.santosh@gmail.com>
     2
     3        * heapwalk/heapwalk.scn, heapwalk/init.c: Add a test case.
     4
    152009-05-19      Chris Johns <chrisj@rtems.org>
    26
  • testsuites/libtests/heapwalk/heapwalk.scn

    rb360885 rc30fcf52  
    11*** HEAP WALK TEST ***
     2Calling Heap Walk without initialising
     3PASS: 1 !HEAP_PREV_USED flag of 1st block isn't set
    24Walk freshly initialized heap
     5Passing negative value for source
    36*** END OF HEAP WALK TEST ***
  • testsuites/libtests/heapwalk/init.c

    rb360885 rc30fcf52  
    3434  puts( "Walk freshly initialized heap" );
    3535  test_heap_init();
     36  _Heap_Walk( &TestHeap, 0x01, true );
     37}
    3638
     39void test_negative_source_value(void)
     40{
     41  test_heap_init();
     42/* Passing a negative value for source so that
     43 * the control enters the if block on line 67
     44 */
     45  puts( "Passing negative value for source" );
     46  _Heap_Walk( &TestHeap, -1, true );
     47
     48}
     49
     50void test_prev_block_flag_check(void)
     51{
     52  /* Calling heapwalk without initialising the heap.
     53   * Covers line 80 and 85 on heapwalk.
     54   * Actually covers more than that.
     55   */
     56  puts( "Calling Heap Walk without initialising" );
    3757  _Heap_Walk( &TestHeap, 0x01, true );
    3858}
     
    4464  puts( "\n\n*** HEAP WALK TEST ***" );
    4565
     66  test_prev_block_flag_check();
    4667  test_walk_freshly_initialized();
     68  test_negative_source_value();
    4769
    4870  puts( "*** END OF HEAP WALK TEST ***" );
Note: See TracChangeset for help on using the changeset viewer.