Changeset fa4c10c in rtems


Ignore:
Timestamp:
Aug 1, 2009, 2:40:37 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
e89cf10
Parents:
ba23ff5
Message:

2009-08-01 Joel Sherrill <joel.sherrill@…>

  • sp63/init.c, sp63/sp63.scn: Move into subroutines and add a second test case to exercise another odd branch not taken.
Location:
testsuites/sptests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    rba23ff5 rfa4c10c  
     12009-08-01      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * sp63/init.c, sp63/sp63.scn: Move into subroutines and add a second
     4        test case to exercise another odd branch not taken.
     5
    162009-07-31      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • testsuites/sptests/sp63/init.c

    rba23ff5 rfa4c10c  
    1313
    1414uint32_t      Memory[256];
     15Heap_Control  Heap;
    1516
    16 rtems_task Init(
    17   rtems_task_argument ignored
    18 )
     17void test_case_one(void)
    1918{
    20   Heap_Control       Heap;
    2119  uint32_t           heap_size;
    2220  void              *ptr1;
     
    2523  Heap_Resize_status hc;
    2624
    27   puts( "\n\n*** TEST 63 ***" );
    28  
    29   puts( "Init - _Heap_Initialize - OK" );
     25  puts( "Init - _Heap_Initialize (for test one) - OK" );
    3026  heap_size = _Heap_Initialize( &Heap, Memory, sizeof(Memory), 8 );
    3127  printf( "Init - Heap size=%d\n", heap_size );
     
    3834  hc = _Heap_Resize_block( &Heap, ptr1, 4, &old, &avail );
    3935  assert( !hc );
     36}
     37
     38void test_case_two(void)
     39{
     40  uint32_t           heap_size;
     41  void              *ptr1;
     42  intptr_t           old;
     43  intptr_t           avail;
     44  Heap_Resize_status hc;
     45
     46  puts( "\nInit - _Heap_Initialize (for test two) - OK" );
     47  heap_size = _Heap_Initialize( &Heap, Memory, sizeof(Memory), 8 );
     48  printf( "Init - Heap size=%d\n", heap_size );
     49
     50  puts( "Init - _Heap_Allocate_aligned - OK");
     51  ptr1 = _Heap_Allocate_aligned( &Heap, 64, 32 );
     52  assert( ptr1 );
     53
     54  puts( "Init - _Heap_Resize_block - OK");
     55  hc = _Heap_Resize_block( &Heap, ptr1, 56, &old, &avail );
     56  assert( !hc );
     57}
     58
     59rtems_task Init(
     60  rtems_task_argument ignored
     61)
     62{
     63  puts( "\n\n*** TEST 63 ***" );
     64 
     65  test_case_one();
     66
     67  test_case_two();
    4068
    4169  puts( "*** END OF TEST 63 ***" );
  • testsuites/sptests/sp63/sp63.scn

    rba23ff5 rfa4c10c  
    11*** TEST 63 ***
    2 Init - _Heap_Initialize - OK
     2Init - _Heap_Initialize (for test one) - OK
     3Init - Heap size=1012
     4Init - _Heap_Allocate_aligned - OK
     5Init - _Heap_Resize_block - OK
     6
     7Init - _Heap_Initialize (for test two) - OK
    38Init - Heap size=1012
    49Init - _Heap_Allocate_aligned - OK
Note: See TracChangeset for help on using the changeset viewer.