IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1944


Ignore:
Timestamp:
Oct 1, 2004, 5:12:25 PM (22 years ago)
Author:
evanalst
Message:

Add additional test case to psImageStats and updated verified stderr file.

Location:
trunk/psLib/test/image
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/image/tst_psImageStats01.c

    r1811 r1944  
    8989                                 "psImageStats functions",
    9090                                 "Calculate Sample Mean, no mask %d" );
    91 
     91        psStats* tmpStats = myStats;
    9292        myStats = psImageStats( myStats, tmpImage, NULL, 0 );
     93        if ( myStats != tmpStats ) {
     94            printf("ERROR: input psStats not equal to return psStats\n");
     95            psAbort(__func__,"Failed input psStats equal to returned psStats");
     96        }
    9397        printf( "The sample mean was %.2f\n", myStats->sampleMean );
    9498
     
    172176    }
    173177
     178    tmpImage = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32);
     179    tmpMask = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_U32);
     180    myStats = psStatsAlloc( PS_STAT_SAMPLE_MEAN );
     181    myStats2 = psImageStats( myStats, tmpImage, tmpMask, 0 );
     182    if ( myStats2 != NULL ) {
     183        printf( "ERROR: psImageStats did not return null when mask is invalid type.\n");
     184    }
     185    psFree(tmpImage);
     186    psFree(tmpMask);
     187    psFree(myStats);
     188    psMemCheckCorruption(1);
     189    memLeaks = psMemCheckLeaks(currentId,NULL,stderr);
     190    if( memLeaks != 0 ) {
     191        psAbort(__func__, "Memory Leaks! (%d leaks)", memLeaks);
     192    }
     193
    174194    printFooter( stdout,
    175195                 "psImageStats functions",
  • trunk/psLib/test/image/verified/tst_psImageStats01.stderr

    r1840 r1944  
    55<DATE><TIME>|<HOST>|E|psLib.image.psImageStats
    66    Specified statistic option did not indicate any operation to perform.
     7<DATE><TIME>|<HOST>|E|psLib.image.psImageStats
     8    Input psImage mask type, psU32, is not the supported mask datatype of psU8.
Note: See TracChangeset for help on using the changeset viewer.