IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 27, 2007, 12:52:03 PM (19 years ago)
Author:
jhoblitt
Message:

s/is_float/is_float/g
s/is_float_tol/is_float_tol/g
s/is_double/is_double/g
s/is_double_tol/is_double_tol/g
s/is_str/is_str/g
s/is_strn/is_strn/g

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/math/tap_psStats00.c

    r12242 r12607  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-03-05 23:23:38 $
     11 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-03-27 22:52:03 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    120120        ok(result, "psVectorStats suceeded (F32: no mask vector, no error vector)");
    121121        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    122         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4,
     122        is_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4,
    123123                     "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32);
    124124        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    131131        ok(result, "psVectorStats suceeded (F32: no mask vector, with error vector)");
    132132        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    133         ok_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskF32);
     133        is_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskF32);
    134134        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    135135    }
     
    144144        ok(result, "psVectorStats suceeded (F32, no mask, no errors, with data range)");
    145145        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    146         ok_float_tol(myStats->sampleMean, expectedMeanRangeNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeNoMaskF32);
     146        is_float_tol(myStats->sampleMean, expectedMeanRangeNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeNoMaskF32);
    147147        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    148148    }
     
    156156        ok(result, "psVectorStats suceeded (F32, no mask, with errors and data range)");
    157157        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    158         ok_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskRangeF32);
     158        is_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskRangeF32);
    159159        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    160160    }
     
    167167        ok(result, "psVectorStats suceeded (F32, with mask, no errors)");
    168168        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    169         ok_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
     169        is_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
    170170        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    171171    }
     
    177177        ok(result, "psVectorStats suceeded (F32, with mask and errors)");
    178178        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    179         ok_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskF32);
     179        is_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskF32);
    180180        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    181181    }
     
    188188        ok(result, "psVectorStats suceeded (F32, with mask and data range)");
    189189        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    190         ok_float_tol(myStats->sampleMean, expectedMeanRangeWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeWithMaskF32);
     190        is_float_tol(myStats->sampleMean, expectedMeanRangeWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeWithMaskF32);
    191191        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    192192    }
     
    198198        ok(result, "psVectorStats suceeded (F32, withmask, errors, and data range)");
    199199        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    200         ok_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskRangeF32);
     200        is_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskRangeF32);
    201201        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    202202    }
     
    214214        ok(result, "psVectorStats suceeded (F32, with mask = 2, no errors)");
    215215        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    216         ok_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
     216        is_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
    217217        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    218218    }
     
    230230        ok(result, "psVectorStats suceeded (F32, with mask = 3, no errors)");
    231231        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    232         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32);
     232        is_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32);
    233233        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    234234    }
     
    276276        ok(result, "psVectorStats suceeded (S8, no mask, no errors)");
    277277        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    278         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskS8, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskS8);
     278        is_float_tol(myStats->sampleMean, expectedMeanNoMaskS8, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskS8);
    279279        psFree(myStats);
    280280        psFree(myVector);
     
    297297        ok(result, "psVectorStats suceeded (U16, no mask, no errors)");
    298298        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    299         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskU16, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskU16);
     299        is_float_tol(myStats->sampleMean, expectedMeanNoMaskU16, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskU16);
    300300        psFree(myStats);
    301301        psFree(myVector);
     
    317317        ok(result, "psVectorStats suceeded (F64, no mask, no errors)");
    318318        ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
    319         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF64, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF64);
     319        is_float_tol(myStats->sampleMean, expectedMeanNoMaskF64, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF64);
    320320        psFree(myStats);
    321321        psFree(myVector);
Note: See TracChangeset for help on using the changeset viewer.