IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12607


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

Location:
trunk/psLib/test
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astro/tap_psEarthOrientation_corrections.c

    r12513 r12607  
    130130                     "Skipping 3 tests because psEarthPole is NULL!");
    131131        psCube *outCube = psSphereToCube(apparent);
    132         ok_double_tol( outCube->x, x, 0.001,
     132        is_double_tol( outCube->x, x, 0.001,
    133133                       "psAberration:                   return correct sphere for valid inputs.");
    134         ok_double_tol( outCube->y, y, 0.001,
     134        is_double_tol( outCube->y, y, 0.001,
    135135                       "psAberration:                   return correct sphere for valid inputs.");
    136         ok_double_tol( outCube->z, z, 0.001,
     136        is_double_tol( outCube->z, z, 0.001,
    137137                       "psAberration:                   return correct sphere for valid inputs.");
    138138        psFree(outCube);
  • trunk/psLib/test/astro/tap_psEarthOrientation_motion.c

    r12513 r12607  
    114114        skip_start(  ep == NULL, 3,
    115115                     "Skipping 3 tests because psEarthPole is NULL!");
    116         ok_double_tol(ep->x, x, 0.1,
     116        is_double_tol(ep->x, x, 0.1,
    117117                      "psEOC_PrecessionModel:          return valid EarthPole for valid inputs (x).");
    118         ok_double_tol(ep->y, y, 0.1,
     118        is_double_tol(ep->y, y, 0.1,
    119119                      "psEOC_PrecessionModel:          return valid EarthPole for valid inputs (y).");
    120         ok_double_tol(ep->s, s, 0.1,
     120        is_double_tol(ep->s, s, 0.1,
    121121                      "psEOC_PrecessionModel:          return valid EarthPole for valid inputs (s).");
    122122        skip_end();
     
    198198        skip_start(  polarMotion == NULL, 3,
    199199                     "Skipping 3 tests because psEarthPole is NULL!");
    200         ok_double_tol(polarMotion->x, x, 0.1,
     200        is_double_tol(polarMotion->x, x, 0.1,
    201201                      "psEOC_GetPolarMotion:          return valid EarthPole for valid inputs "
    202202                      "(x) - IERS B.");
    203         ok_double_tol(polarMotion->y, y, 0.1,
     203        is_double_tol(polarMotion->y, y, 0.1,
    204204                      "psEOC_GetPolarMotion:          return valid EarthPole for valid inputs "
    205205                      "(y) - IERS B.");
    206         ok_double_tol(polarMotion->s, s, 0.1,
     206        is_double_tol(polarMotion->s, s, 0.1,
    207207                      "psEOC_GetPolarMotion:          return valid EarthPole for valid inputs "
    208208                      "(s) - IERS B.");
     
    219219        skip_start(  polarMotion == NULL, 3,
    220220                     "Skipping 3 tests because psEarthPole is NULL!");
    221         ok_double_tol(polarMotion->x, x, 0.1,
     221        is_double_tol(polarMotion->x, x, 0.1,
    222222                      "psEOC_GetPolarMotion:          return valid EarthPole for valid inputs "
    223223                      "(x) - IERS A.");
    224         ok_double_tol(polarMotion->y, y, 0.1,
     224        is_double_tol(polarMotion->y, y, 0.1,
    225225                      "psEOC_GetPolarMotion:          return valid EarthPole for valid inputs "
    226226                      "(y) - IERS A.");
    227         ok_double_tol(polarMotion->s, s, 0.1,
     227        is_double_tol(polarMotion->s, s, 0.1,
    228228                      "psEOC_GetPolarMotion:          return valid EarthPole for valid inputs "
    229229                      "(s) - IERS A.");
     
    289289        skip_start(  out == NULL, 4,
    290290                     "Skipping 4 tests because psSphereRot output is NULL!");
    291         ok_double_tol( out->q0, q0, 0.0001,
     291        is_double_tol( out->q0, q0, 0.0001,
    292292                       "psSphereRot_CEOtoGCRS:         return correct psSphereRot for valid input (q0).");
    293         ok_double_tol( out->q1, q1, 0.0001,
     293        is_double_tol( out->q1, q1, 0.0001,
    294294                       "psSphereRot_CEOtoGCRS:         return correct psSphereRot for valid input (q1).");
    295         ok_double_tol( out->q2, q2, 0.0001,
     295        is_double_tol( out->q2, q2, 0.0001,
    296296                       "psSphereRot_CEOtoGCRS:         return correct psSphereRot for valid input (q2).");
    297         ok_double_tol( out->q3, -q3, 0.0001,
     297        is_double_tol( out->q3, -q3, 0.0001,
    298298                       "psSphereRot_CEOtoGCRS:         return correct psSphereRot for valid input (q3).");
    299299        skip_end();
     
    355355        psSphere *result = psSphereRotApply(NULL, earthRot, obj);
    356356        psCube *cube = psSphereToCube(result);
    357         ok_double_tol( cube->x, x, 0.0001,
     357        is_double_tol( cube->x, x, 0.0001,
    358358                       "psSphereRot_TEOtoCEO:          return NULL for NULL time input. (x)");
    359         ok_double_tol( cube->y, y, 0.0001,
     359        is_double_tol( cube->y, y, 0.0001,
    360360                       "psSphereRot_TEOtoCEO:          return NULL for NULL time input. (y)");
    361         ok_double_tol( cube->z, z, 0.0001,
     361        is_double_tol( cube->z, z, 0.0001,
    362362                       "psSphereRot_TEOtoCEO:          return NULL for NULL time input. (z)");
    363363        psFree(earthRot);
     
    390390        skip_start(  out == NULL, 4,
    391391                     "Skipping 4 tests because psSphereRot output is NULL!");
    392         ok_double_tol( out->q0, q0, 0.0001,
     392        is_double_tol( out->q0, q0, 0.0001,
    393393                       "psSphereRot_ITRStoTEO:         return correct psSphereRot for valid input (q0).");
    394         ok_double_tol( out->q1, q1, 0.0001,
     394        is_double_tol( out->q1, q1, 0.0001,
    395395                       "psSphereRot_ITRStoTEO:         return correct psSphereRot for valid input (q1).");
    396         ok_double_tol( out->q2, q2, 0.0001,
     396        is_double_tol( out->q2, q2, 0.0001,
    397397                       "psSphereRot_ITRStoTEO:         return correct psSphereRot for valid input (q2).");
    398         ok_double_tol( out->q3, q3, 0.0001,
     398        is_double_tol( out->q3, q3, 0.0001,
    399399                       "psSphereRot_ITRStoTEO:         return correct psSphereRot for valid input (q3).");
    400400        skip_end();
     
    462462        skip_start( rot == NULL || outputCoord == NULL, 2,
    463463                    "Skipping 2 tests because psSphereRot output is NULL!");
    464         ok_double_tol( outputCoord->r, SPHERE_PRECESS_TP1_EXPECT_R, ERROR_TOL,
     464        is_double_tol( outputCoord->r, SPHERE_PRECESS_TP1_EXPECT_R, ERROR_TOL,
    465465                       "psSpherePrecess:               return correct psSphereRot for valid"
    466466                       " inputs and PS_PRECESS_ROUGH mode. (r)");
    467         ok_double_tol( outputCoord->d, SPHERE_PRECESS_TP1_EXPECT_D, ERROR_TOL,
     467        is_double_tol( outputCoord->d, SPHERE_PRECESS_TP1_EXPECT_D, ERROR_TOL,
    468468                       "psSpherePrecess:               return correct psSphereRot for valid"
    469469                       " inputs and PS_PRECESS_ROUGH mode. (d)");
     
    485485        skip_start( rot == NULL || outputCoord == NULL, 2,
    486486                    "Skipping 2 tests because psSphereRot output is NULL!");
    487         ok_double_tol( outputCoord->r, SPHERE_PRECESS_TP2_EXPECT_R, ERROR_TOL,
     487        is_double_tol( outputCoord->r, SPHERE_PRECESS_TP2_EXPECT_R, ERROR_TOL,
    488488                       "psSpherePrecess:               return correct psSphereRot for valid"
    489489                       " inputs and PS_PRECESS_ROUGH mode. (r)");
    490         ok_double_tol( outputCoord->d, SPHERE_PRECESS_TP2_EXPECT_D, ERROR_TOL,
     490        is_double_tol( outputCoord->d, SPHERE_PRECESS_TP2_EXPECT_D, ERROR_TOL,
    491491                       "psSpherePrecess:               return correct psSphereRot for valid"
    492492                       " inputs and PS_PRECESS_ROUGH mode. (d)");
     
    508508        skip_start( rot == NULL || outputCoord == NULL, 2,
    509509                    "Skipping 2 tests because psSphereRot output is NULL!");
    510         ok_double_tol( outputCoord->r, SPHERE_PRECESS_TP3_EXPECT_R, ERROR_TOL,
     510        is_double_tol( outputCoord->r, SPHERE_PRECESS_TP3_EXPECT_R, ERROR_TOL,
    511511                       "psSpherePrecess:               return correct psSphereRot for valid"
    512512                       " inputs and PS_PRECESS_ROUGH mode. (r)");
    513         ok_double_tol( outputCoord->d, SPHERE_PRECESS_TP3_EXPECT_D, ERROR_TOL,
     513        is_double_tol( outputCoord->d, SPHERE_PRECESS_TP3_EXPECT_D, ERROR_TOL,
    514514                       "psSpherePrecess:               return correct psSphereRot for valid"
    515515                       " inputs and PS_PRECESS_ROUGH mode. (d)");
  • trunk/psLib/test/astro/tap_psSphereOps_all.c

    r12513 r12607  
    7777        ok( myST != NULL && psMemCheckSphereRot(myST),
    7878            "psSphereRotAlloc:               return allocated SphereRot for valid inputs.");
    79         ok_double(q0, myST->q0,
     79        is_double(q0, myST->q0,
    8080                  "psSphereRotAlloc:               return correct q0 value.");
    81         ok_double(q1, myST->q1,
     81        is_double(q1, myST->q1,
    8282                  "psSphereRotAlloc:               return correct q1 value.");
    83         ok_double(q2, myST->q2,
     83        is_double(q2, myST->q2,
    8484                  "psSphereRotAlloc:               return correct q2 value.");
    85         ok_double(q3, myST->q3,
     85        is_double(q3, myST->q3,
    8686                  "psSphereRotAlloc:               return correct q3 value.");
    8787    }
     
    107107        ok( myST != NULL && psMemCheckSphereRot(myST),
    108108            "psSphereRotQuat:                return allocated SphereRot for valid inputs.");
    109         ok_double(q0, myST->q0,
     109        is_double(q0, myST->q0,
    110110                  "psSphereRotQuat:               return correct q0 value.");
    111         ok_double(q1, myST->q1,
     111        is_double(q1, myST->q1,
    112112                  "psSphereRotQuat:               return correct q1 value.");
    113         ok_double(q2, myST->q2,
     113        is_double(q2, myST->q2,
    114114                  "psSphereRotQuat:               return correct q2 value.");
    115         ok_double(q3, myST->q3,
     115        is_double(q3, myST->q3,
    116116                  "psSphereRotQuat:               return correct q3 value.");
    117117    }
     
    190190                     "Skipping 1 tests because psSphereRotApply failed!");
    191191        out2 = psSphereRotApply(out2, s1, out);
    192         ok_double( out2->r, 0.0,
     192        is_double( out2->r, 0.0,
    193193                   "psSphereRotConjugate:          return correct SphereRot values.");
    194         ok_double( out2->d, 0.0,
     194        is_double( out2->d, 0.0,
    195195                   "psSphereRotConjugate:          return correct SphereRot values.");
    196196        skip_end();
     
    207207    {
    208208        s1 = psSphereRotInvert(-PHI_P, -DELTA_P, -ALPHA_P);
    209         ok_double(s1->q0, myST->q0,
     209        is_double(s1->q0, myST->q0,
    210210                  "psSphereRotInvert:             return correct q0 value.");
    211         ok_double(s1->q1, myST->q1,
     211        is_double(s1->q1, myST->q1,
    212212                  "psSphereRotInvert:             return correct q1 value.");
    213         ok_double(s1->q2, myST->q2,
     213        is_double(s1->q2, myST->q2,
    214214                  "psSphereRotInvert:             return correct q2 value.");
    215         ok_double(s1->q3, myST->q3,
     215        is_double(s1->q3, myST->q3,
    216216                  "psSphereRotInvert:             return correct q3 value.");
    217217        psFree(s1);
     
    240240        icrs->d = DEG_TO_RAD(90.0);
    241241        psSphere* ecliptic = psSphereRotApply(NULL, s1, icrs);
    242         ok_double_tol(DEG_TO_RAD(90.0), ecliptic->r, 0.00001,
     242        is_double_tol(DEG_TO_RAD(90.0), ecliptic->r, 0.00001,
    243243                      "psSphereRotICRSToEcliptic:     return correct SphereRot for MJD_2000 date.");
    244         ok_double_tol(DEG_TO_RAD(66.560719), ecliptic->d, 0.00001,
     244        is_double_tol(DEG_TO_RAD(66.560719), ecliptic->d, 0.00001,
    245245                      "psSphereRotICRSToEcliptic:     return correct SphereRot for MJD_2000 date.");
    246246        psFree(ecliptic);
     
    271271        psSphere* fromEcliptic = psSphereRotApply(NULL, s2, ecliptic);
    272272        //XXX:  Pretty sure the following can be 180 degrees OR 0 degrees. (= the poles)
    273         ok_double_tol(DEG_TO_RAD(180.0), fromEcliptic->r, 0.00001,
     273        is_double_tol(DEG_TO_RAD(180.0), fromEcliptic->r, 0.00001,
    274274                      "psSphereRotEclipticToICRS:     return correct SphereRot for MJD_2000 date.");
    275         ok_double_tol(DEG_TO_RAD(90.0), fromEcliptic->d, 0.00001,
     275        is_double_tol(DEG_TO_RAD(90.0), fromEcliptic->d, 0.00001,
    276276                      "psSphereRotEclipticToICRS:     return correct SphereRot for MJD_2000 date.");
    277277        psFree(ecliptic);
     
    289289        s2 = psSphereRotICRSToGalactic();
    290290        galactic = psSphereRotApply(NULL, s2, icrs);
    291         ok_double_tol(DEG_TO_RAD(122.93192), galactic->r, 0.00001,
     291        is_double_tol(DEG_TO_RAD(122.93192), galactic->r, 0.00001,
    292292                      "psSphereRotICRSToGalactic:     return correct SphereRot.");
    293         ok_double_tol(DEG_TO_RAD(27.12825), galactic->d, 0.00001,
     293        is_double_tol(DEG_TO_RAD(27.12825), galactic->d, 0.00001,
    294294                      "psSphereRotICRSToGalactic:     return correct SphereRot.");
    295295    }
     
    300300        psSphere *test = psSphereRotApply(NULL, s1, galactic);
    301301        //XXX:  Pretty sure the following can be 180 degrees OR 0 degrees. (= the poles)
    302         ok_double_tol(DEG_TO_RAD(180.0), test->r, 0.00001,
     302        is_double_tol(DEG_TO_RAD(180.0), test->r, 0.00001,
    303303                      "psSphereRotGalacticToICRS:     return correct SphereRot.");
    304         ok_double_tol(DEG_TO_RAD(90.0), test->d, 0.00001,
     304        is_double_tol(DEG_TO_RAD(90.0), test->d, 0.00001,
    305305                      "psSphereRotGalacticToICRS:     return correct SphereRot.");
    306306        psFree(test);
     
    382382        output = psSphereGetOffset(origin, offset, PS_SPHERICAL, PS_ARCMIN);
    383383        empty = psSphereGetOffset(origin, offset, PS_SPHERICAL, PS_DEGREE);
    384         ok_double_tol(DEG_TO_RAD(empty->r), MIN_TO_RAD(output->r), 0.0001,
     384        is_double_tol(DEG_TO_RAD(empty->r), MIN_TO_RAD(output->r), 0.0001,
    385385                      "psSphereGetOffset:             return correct offset for differing units.");
    386         ok_double_tol(DEG_TO_RAD(empty->d), MIN_TO_RAD(output->d), 0.0001,
     386        is_double_tol(DEG_TO_RAD(empty->d), MIN_TO_RAD(output->d), 0.0001,
    387387                      "psSphereGetOffset:             return correct offset for differing units.");
    388388        psFree(output);
     
    426426        skip_start(  output == NULL, 2,
    427427                     "Skipping 2 tests because Sphere output is NULL!");
    428         ok_double(output->r, M_PI/4.0,
     428        is_double(output->r, M_PI/4.0,
    429429                  "psSphereSetOffset:             return correct spherical offset.");
    430         ok_double(output->d, M_PI/6.0,
     430        is_double(output->d, M_PI/6.0,
    431431                  "psSphereSetOffset:             return correct spherical offset.");
    432432        skip_end();
     
    443443        skip_start(  empty == NULL, 2,
    444444                     "Skipping 2 tests because Sphere output is NULL!");
    445         ok_double_tol(empty->r, offset->r, 0.00001,
     445        is_double_tol(empty->r, offset->r, 0.00001,
    446446                      "psSphereGetOffset:             return correct spherical offset.");
    447         ok_double_tol(empty->d, offset->d, 0.00001,
     447        is_double_tol(empty->d, offset->d, 0.00001,
    448448                      "psSphereGetOffset:             return correct spherical offset.");
    449449        skip_end();
     
    464464        skip_start(  empty == NULL, 2,
    465465                     "Skipping 2 tests because Sphere output is NULL!");
    466         ok_double_tol(empty->r, (M_PI / 4.0), 0.0001,
     466        is_double_tol(empty->r, (M_PI / 4.0), 0.0001,
    467467                      "psSphereGetOffset:             return correct spherical offset.");
    468         ok_double_tol(empty->d, (M_PI / 6.0), 0.0001,
     468        is_double_tol(empty->d, (M_PI / 6.0), 0.0001,
    469469                      "psSphereGetOffset:             return correct spherical offset.");
    470470        skip_end();
     
    480480        offset->d = (M_PI / 6.0);     //30 deg
    481481        empty = psSphereSetOffset(origin, offset, PS_SPHERICAL, PS_RADIAN);
    482         ok_double_tol(empty->r, offset->r, 0.0001,
     482        is_double_tol(empty->r, offset->r, 0.0001,
    483483                      "psSphereSetOffset:             return correct offset for differing units.");
    484         ok_double_tol(empty->d, offset->d, 0.0001,
     484        is_double_tol(empty->d, offset->d, 0.0001,
    485485                      "psSphereSetOffset:             return correct offset for differing units.");
    486486        psFree(output);
  • trunk/psLib/test/astro/tap_psTime_01.c

    r12412 r12607  
    2323 *  @author  Eric Van Alst, MHPCC
    2424 *
    25  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    26  *  @date  $Date: 2007-03-13 00:01:37 $
     25 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     26 *  @date  $Date: 2007-03-27 22:52:02 $
    2727 *
    2828 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    187187        psMemId id = psMemGetId();
    188188        psF64 ut1Delta = psTimeGetUT1Delta(NULL, PS_IERS_B);
    189         ok_double(ut1Delta, NAN, "psTimeGetUT1Delta(NULL, PS_IERS_B) returned NAN");
     189        is_double(ut1Delta, NAN, "psTimeGetUT1Delta(NULL, PS_IERS_B) returned NAN");
    190190        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    191191    }
     
    200200        time->leapsecond = false;
    201201        psF64 ut1Delta = psTimeGetUT1Delta(time, PS_IERS_B);
    202         ok_double(ut1Delta, NAN, "psTimeGetUT1Delta() returned NAN for incorrect time");
     202        is_double(ut1Delta, NAN, "psTimeGetUT1Delta() returned NAN for incorrect time");
    203203        psFree(time);
    204204        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    214214        time->leapsecond = false;
    215215        psF64 ut1Delta = psTimeGetUT1Delta(time, -100);
    216         ok_double(ut1Delta, NAN, "psTimeGetUT1Delta(time, -100) returned NAN (incorrect bulletin)");
     216        is_double(ut1Delta, NAN, "psTimeGetUT1Delta(time, -100) returned NAN (incorrect bulletin)");
    217217        psFree(time);
    218218        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    229229        psF64 ut1Delta = psTimeGetUT1Delta(time, PS_IERS_A);
    230230
    231         ok_double_tol(ut1Delta, testTime1UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin A");
     231        is_double_tol(ut1Delta, testTime1UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin A");
    232232
    233233        psFree(time);
     
    244244        psF64 ut1Delta = psTimeGetUT1Delta(time, PS_IERS_B);
    245245
    246         ok_double_tol(ut1Delta, testTime1UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
     246        is_double_tol(ut1Delta, testTime1UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
    247247
    248248        psFree(time);
     
    262262        psF64 ut1Delta = psTimeGetUT1Delta(time,PS_IERS_A);
    263263
    264         ok_double_tol(ut1Delta, testTime2UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
     264        is_double_tol(ut1Delta, testTime2UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
    265265
    266266        psFree(time);
     
    280280        psF64 ut1Delta = psTimeGetUT1Delta(time,PS_IERS_B);
    281281
    282         ok_double_tol(ut1Delta, testTime2UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
     282        is_double_tol(ut1Delta, testTime2UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
    283283
    284284        psFree(time);
     
    298298        psF64 ut1Delta = psTimeGetUT1Delta(time,PS_IERS_A);
    299299
    300         ok_double_tol(ut1Delta, testTime3UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
     300        is_double_tol(ut1Delta, testTime3UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
    301301
    302302        psFree(time);
     
    315315        psF64 ut1Delta = psTimeGetUT1Delta(time,PS_IERS_B);
    316316
    317         ok_double_tol(ut1Delta, testTime3UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
     317        is_double_tol(ut1Delta, testTime3UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");
    318318
    319319        psFree(time);
     
    329329        psMemId id = psMemGetId();
    330330        psF64 mjd = psTimeToMJD(NULL);
    331         ok_double(mjd, NAN, "psTimeToMJD(NULL) returned NULL");
     331        is_double(mjd, NAN, "psTimeToMJD(NULL) returned NULL");
    332332        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    333333    }
     
    346346        time->leapsecond = false;
    347347        psF64 mjd = psTimeToMJD(time);
    348         ok_double(mjd, NAN, "psTimeToMJD() returned NAN for incorrect time");
     348        is_double(mjd, NAN, "psTimeToMJD() returned NAN for incorrect time");
    349349        psFree(time);
    350350        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    361361        psF64 mjd = psTimeToMJD(time);
    362362
    363         ok_double_tol(mjd, 53207.765929, ERROR_TOL, "psTimeToMJD() returned correct time after 1/1/1970 epoch");
     363        is_double_tol(mjd, 53207.765929, ERROR_TOL, "psTimeToMJD() returned correct time after 1/1/1970 epoch");
    364364
    365365        psFree(time);
     
    376376        psF64 mjd = psTimeToMJD(time);
    377377
    378         ok_double_tol(mjd, testTime4MJD, ERROR_TOL, "psTimeToMJD() returned correct time before 1/1/1970 epoch");
     378        is_double_tol(mjd, testTime4MJD, ERROR_TOL, "psTimeToMJD() returned correct time before 1/1/1970 epoch");
    379379
    380380        psFree(time);
     
    391391        psF64 jd = psTimeToJD(NULL);
    392392
    393         ok_double(jd, NAN, "psTimeToJD(NULL) returned NULL");
     393        is_double(jd, NAN, "psTimeToJD(NULL) returned NULL");
    394394        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    395395    }
     
    407407        psF64 jd = psTimeToJD(time);
    408408       
    409         ok_double(jd, NAN, "psTimeToJD() returned NAN for incorrect time");
     409        is_double(jd, NAN, "psTimeToJD() returned NAN for incorrect time");
    410410
    411411        psFree(time);
     
    423423        psF64 jd = psTimeToJD(time);
    424424
    425         ok_double_tol(jd, 2453208.265929, ERROR_TOL, "psTimeToJD() returned the correct time after 1/1/1970 epoch");
     425        is_double_tol(jd, 2453208.265929, ERROR_TOL, "psTimeToJD() returned the correct time after 1/1/1970 epoch");
    426426
    427427        psFree(time);
     
    439439        psF64 jd = psTimeToJD(time);
    440440
    441         ok_double_tol(jd, testTime4JD, ERROR_TOL, "psTimeToJD() returned the correct time before 1/1/1970 epoch");
     441        is_double_tol(jd, testTime4JD, ERROR_TOL, "psTimeToJD() returned the correct time before 1/1/1970 epoch");
    442442
    443443        psFree(time);
     
    528528        char *timeStr = psTimeToISO(time);
    529529
    530         ok_str(timeStr, testTime1Str, "psTimeToISO(time) returned correct time (no leapsecond)");
     530        is_str(timeStr, testTime1Str, "psTimeToISO(time) returned correct time (no leapsecond)");
    531531
    532532        psFree(timeStr);
     
    547547        char *timeStr = psTimeToISO(time);
    548548
    549         ok_str(timeStr, testTime1StrLeap, "psTimeToISO(time) returned correct time (with leapsecond)");
     549        is_str(timeStr, testTime1StrLeap, "psTimeToISO(time) returned correct time (with leapsecond)");
    550550
    551551        psFree(timeStr);
  • trunk/psLib/test/astro/tap_psTime_02.c

    r12413 r12607  
    1212 *  @author  Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2007-03-13 00:02:14 $
     14 *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     15 *  @date  $Date: 2007-03-27 22:52:02 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6666
    6767        psF64 lmst = psTimeToLMST(NULL, 0);
    68         ok_double(lmst, NAN, "psTimeToLMST(time,0) returned NAN");
     68        is_double(lmst, NAN, "psTimeToLMST(time,0) returned NAN");
    6969
    7070        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    8282
    8383        psF64 lmst = psTimeToLMST(time, 0.0);
    84         ok_double_tol(lmst, testTime1LMST0, ERROR_TOL, "psTimeToLMST() returned the correct time");
     84        is_double_tol(lmst, testTime1LMST0, ERROR_TOL, "psTimeToLMST() returned the correct time");
    8585
    8686        psFree(time);
     
    102102
    103103        psF64 lmst = psTimeToLMST(time,0.0);
    104         ok_double(lmst, NAN, "psTimeToLMST() generated a NAN for incorrect type");
     104        is_double(lmst, NAN, "psTimeToLMST() generated a NAN for incorrect type");
    105105
    106106        psFree(time);
  • trunk/psLib/test/astro/tap_psTime_03.c

    r12414 r12607  
    1111 *  @author  Eric Van Alst, MHPCC
    1212 *
    13  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    14  *  @date  $Date: 2007-03-13 00:19:21 $
     13 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     14 *  @date  $Date: 2007-03-27 22:52:02 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    326326
    327327        psF64 delta = psTimeDelta(NULL, NULL);
    328         ok_double_tol(delta, 0.0, ERROR_TOL, "psTimeDelta(NULL, NULL) returned 0.0");
     328        is_double_tol(delta, 0.0, ERROR_TOL, "psTimeDelta(NULL, NULL) returned 0.0");
    329329
    330330        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    341341
    342342        psF64 delta = psTimeDelta(time1, NULL);
    343         ok_double_tol(delta, 0.0, ERROR_TOL, "psTimeDelta(time1, NULL) returned 0.0");
     343        is_double_tol(delta, 0.0, ERROR_TOL, "psTimeDelta(time1, NULL) returned 0.0");
    344344
    345345        psFree(time1);
     
    360360
    361361        psF64 delta = psTimeDelta(time1, time2);
    362         ok_double_tol(delta, 0.0, ERROR_TOL, "psTimeDelta(time1, NULL) returned 0.0 for unallowed time1 arg");
     362        is_double_tol(delta, 0.0, ERROR_TOL, "psTimeDelta(time1, NULL) returned 0.0 for unallowed time1 arg");
    363363
    364364        psFree(time1);
     
    382382
    383383        psF64 delta = psTimeDelta(time1, time2);
    384         ok_double_tol(delta, 0.0,  ERROR_TOL, "psTimeDelta(time1, NULL) returned 0.0 for unallowed time2 arg");
     384        is_double_tol(delta, 0.0,  ERROR_TOL, "psTimeDelta(time1, NULL) returned 0.0 for unallowed time2 arg");
    385385
    386386        psFree(time1);
     
    406406
    407407        psF64 delta = psTimeDelta(time1, time2);
    408         ok_double_tol(delta, 0.0, ERROR_TOL, "psTimeDelta(time1, NULL) returned 0.0 for different time types");
     408        is_double_tol(delta, 0.0, ERROR_TOL, "psTimeDelta(time1, NULL) returned 0.0 for different time types");
    409409
    410410        psFree(time1);
     
    428428
    429429        psF64 delta = psTimeDelta(time2, time1);
    430         ok_double_tol(delta, deltaTime1, ERROR_TOL, "psTimeDelta(time1, NULL) returned correct delta for times of the same type");
     430        is_double_tol(delta, deltaTime1, ERROR_TOL, "psTimeDelta(time1, NULL) returned correct delta for times of the same type");
    431431
    432432        psFree(time1);
     
    451451
    452452        psF64 delta = psTimeDelta(time2,time1);
    453         ok_double_tol(delta, deltaTime2, ERROR_TOL, "psTimeDelta(time1, NULL) returned correct delta for times of the same type");
     453        is_double_tol(delta, deltaTime2, ERROR_TOL, "psTimeDelta(time1, NULL) returned correct delta for times of the same type");
    454454
    455455        psFree(time1);
     
    474474       
    475475        psF64 delta = psTimeDelta(time2,time1);
    476         ok_double_tol(delta, deltaTime3, ERROR_TOL, "psTimeDelta(time1, NULL) returned correct delta for times of the same type");
     476        is_double_tol(delta, deltaTime3, ERROR_TOL, "psTimeDelta(time1, NULL) returned correct delta for times of the same type");
    477477
    478478        psFree(time1);
     
    494494            // Verify TAI ISO string
    495495            char *timeStr = psTimeToISO(time);
    496             ok_str(timeStr, testTimeBStrTAI[i], "TAI ISO string");
     496            is_str(timeStr, testTimeBStrTAI[i], "TAI ISO string");
    497497            psFree(timeStr);
    498498
    499499            time = psTimeConvert(time, PS_TIME_TT);
    500500            timeStr = psTimeToISO(time);
    501             ok_str(timeStr, testTimeBStrTT[i], "TT ISO string");
     501            is_str(timeStr, testTimeBStrTT[i], "TT ISO string");
    502502            psFree(timeStr);
    503503
     
    506506            time->leapsecond = testTimeBLeapsecond[i];
    507507            timeStr = psTimeToISO(time);
    508             ok_str(timeStr, testTimeBStrUTC[i], "UTC ISO string");
     508            is_str(timeStr, testTimeBStrUTC[i], "UTC ISO string");
    509509            psFree(timeStr);
    510510
    511511            time = psTimeConvert(time, PS_TIME_UT1);
    512512            timeStr = psTimeToISO(time);
    513             ok_str(timeStr, testTimeBStrUT1[i], "UT1 ISO string");
     513            is_str(timeStr, testTimeBStrUT1[i], "UT1 ISO string");
    514514            psFree(timeStr);
    515515
  • trunk/psLib/test/db/tap_psDB.c

    r12393 r12607  
    66 *  @author Joshua Hoblitt, University of Hawaii
    77 *
    8  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-03-10 01:24:09 $
     8 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-03-27 22:52:02 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    164164            // XXX this test is depending on the order the rows come out it...
    165165            // this shouldn't be depended upon
    166             ok_str((char *)column->data[0], "brown", "horse.color == 'brown'");
     166            is_str((char *)column->data[0], "brown", "horse.color == 'brown'");
    167167            ok((char *)column->data[1] == NULL,    "horse.color == NULL");
    168             ok_str((char *)column->data[2], "pink",  "horse.color == 'pink'");
     168            is_str((char *)column->data[2], "pink",  "horse.color == 'pink'");
    169169
    170170            psFree(column);
     
    177177            is_long(psVectorLength(column), 2, "psDBSelectColumnNum() - number of elements");
    178178
    179             ok_float(column->data.F32[0], 10e3, "hair == 10e3")
    180             ok_float(column->data.F32[1], NAN, "hair == NAN")
     179            is_float(column->data.F32[0], 10e3, "hair == 10e3")
     180            is_float(column->data.F32[1], NAN, "hair == NAN")
    181181
    182182            psFree(column);
     
    197197
    198198                psMetadataItem *item = psListGet(md->list, 0);
    199                 ok_str(item->name, "color", "column name");
    200                 ok_str((char *)item->data.V, "brown", "column value");
     199                is_str(item->name, "color", "column name");
     200                is_str((char *)item->data.V, "brown", "column value");
    201201            }
    202202            psFree(resultSet);
     
    219219
    220220            psMetadataItem *item = psListGet(columns->list, 0);
    221             ok_str(item->name, "color", "column name");
     221            is_str(item->name, "color", "column name");
    222222            is_long(psArrayLength((psArray*)item->data.V), 3, "column array length");
    223223
     
    245245
    246246                psMetadataItem *item = psListGet(md->list, 0);
    247                 ok_str((char *)item->data.V, "HOT pink", "psDBUpdateRows() - psDBSelectRows() found HOT pink");
     247                is_str((char *)item->data.V, "HOT pink", "psDBUpdateRows() - psDBSelectRows() found HOT pink");
    248248
    249249            }
  • trunk/psLib/test/imageops/tap_psImageShift.c

    r12513 r12607  
    2828        // integer shifts should be exact
    2929        psImage *shift = psImageShift (NULL, image, 1.0, 1.0, 0.0, PS_INTERPOLATE_BILINEAR);
    30         ok_float (shift->data.F32[10][10], 0.0, "point 10,10 should be 0.0 : %f", shift->data.F32[10][10]);
    31         ok_float (shift->data.F32[10][11], 0.0, "point 10,11 should be 0.0 : %f", shift->data.F32[10][11]);
    32         ok_float (shift->data.F32[10][12], 0.0, "point 10,12 should be 0.0 : %f", shift->data.F32[10][12]);
    33         ok_float (shift->data.F32[11][10], 0.0, "point 11,10 should be 0.0 : %f", shift->data.F32[11][10]);
    34         ok_float (shift->data.F32[11][11], 1.0, "point 11,11 should be 1.0 : %f", shift->data.F32[11][11]);
    35         ok_float (shift->data.F32[11][12], 0.0, "point 11,12 should be 0.0 : %f", shift->data.F32[11][12]);
    36         ok_float (shift->data.F32[12][10], 0.0, "point 12,10 should be 0.0 : %f", shift->data.F32[12][10]);
    37         ok_float (shift->data.F32[12][11], 0.0, "point 12,11 should be 0.0 : %f", shift->data.F32[12][11]);
    38         ok_float (shift->data.F32[12][12], 0.0, "point 12,12 should be 0.0 : %f", shift->data.F32[12][12]);
     30        is_float (shift->data.F32[10][10], 0.0, "point 10,10 should be 0.0 : %f", shift->data.F32[10][10]);
     31        is_float (shift->data.F32[10][11], 0.0, "point 10,11 should be 0.0 : %f", shift->data.F32[10][11]);
     32        is_float (shift->data.F32[10][12], 0.0, "point 10,12 should be 0.0 : %f", shift->data.F32[10][12]);
     33        is_float (shift->data.F32[11][10], 0.0, "point 11,10 should be 0.0 : %f", shift->data.F32[11][10]);
     34        is_float (shift->data.F32[11][11], 1.0, "point 11,11 should be 1.0 : %f", shift->data.F32[11][11]);
     35        is_float (shift->data.F32[11][12], 0.0, "point 11,12 should be 0.0 : %f", shift->data.F32[11][12]);
     36        is_float (shift->data.F32[12][10], 0.0, "point 12,10 should be 0.0 : %f", shift->data.F32[12][10]);
     37        is_float (shift->data.F32[12][11], 0.0, "point 12,11 should be 0.0 : %f", shift->data.F32[12][11]);
     38        is_float (shift->data.F32[12][12], 0.0, "point 12,12 should be 0.0 : %f", shift->data.F32[12][12]);
    3939        psFree(shift);
    4040        psFree(image);
     
    6464        psImage *shift = psImageShift (NULL, image, 0.2, 0.4, 0.0, PS_INTERPOLATE_BILINEAR);
    6565//        diag("these require tolerance of 4 epsilon (why?)");
    66         ok_float_tol (shift->data.F32[10][10], 0.8*0.6, 4*FLT_EPSILON, "point 10,10 should be %f : %f", 0.8*0.6, shift->data.F32[10][10]);
    67         ok_float_tol (shift->data.F32[10][11], 0.2*0.6, 4*FLT_EPSILON, "point 10,11 should be %f : %f", 0.2*0.6, shift->data.F32[10][11]);
    68         ok_float_tol (shift->data.F32[10][12], 0.0,     4*FLT_EPSILON, "point 10,12 should be %f : %f", 0.0,     shift->data.F32[10][12]);
    69         ok_float_tol (shift->data.F32[11][10], 0.8*0.4, 4*FLT_EPSILON, "point 11,10 should be %f : %f", 0.8*0.4, shift->data.F32[11][10]);
    70         ok_float_tol (shift->data.F32[11][11], 0.2*0.4, 4*FLT_EPSILON, "point 11,11 should be %f : %f", 0.2*0.4, shift->data.F32[11][11]);
    71         ok_float_tol (shift->data.F32[11][12], 0.0,     4*FLT_EPSILON, "point 11,12 should be %f : %f", 0.0,     shift->data.F32[11][12]);
    72         ok_float_tol (shift->data.F32[12][10], 0.0,     4*FLT_EPSILON, "point 12,10 should be %f : %f", 0.0,     shift->data.F32[12][10]);
    73         ok_float_tol (shift->data.F32[12][11], 0.0,     4*FLT_EPSILON, "point 12,11 should be %f : %f", 0.0,     shift->data.F32[12][11]);
    74         ok_float_tol (shift->data.F32[12][12], 0.0,     4*FLT_EPSILON, "point 12,12 should be %f : %f", 0.0,     shift->data.F32[12][12]);
     66        is_float_tol (shift->data.F32[10][10], 0.8*0.6, 4*FLT_EPSILON, "point 10,10 should be %f : %f", 0.8*0.6, shift->data.F32[10][10]);
     67        is_float_tol (shift->data.F32[10][11], 0.2*0.6, 4*FLT_EPSILON, "point 10,11 should be %f : %f", 0.2*0.6, shift->data.F32[10][11]);
     68        is_float_tol (shift->data.F32[10][12], 0.0,     4*FLT_EPSILON, "point 10,12 should be %f : %f", 0.0,     shift->data.F32[10][12]);
     69        is_float_tol (shift->data.F32[11][10], 0.8*0.4, 4*FLT_EPSILON, "point 11,10 should be %f : %f", 0.8*0.4, shift->data.F32[11][10]);
     70        is_float_tol (shift->data.F32[11][11], 0.2*0.4, 4*FLT_EPSILON, "point 11,11 should be %f : %f", 0.2*0.4, shift->data.F32[11][11]);
     71        is_float_tol (shift->data.F32[11][12], 0.0,     4*FLT_EPSILON, "point 11,12 should be %f : %f", 0.0,     shift->data.F32[11][12]);
     72        is_float_tol (shift->data.F32[12][10], 0.0,     4*FLT_EPSILON, "point 12,10 should be %f : %f", 0.0,     shift->data.F32[12][10]);
     73        is_float_tol (shift->data.F32[12][11], 0.0,     4*FLT_EPSILON, "point 12,11 should be %f : %f", 0.0,     shift->data.F32[12][11]);
     74        is_float_tol (shift->data.F32[12][12], 0.0,     4*FLT_EPSILON, "point 12,12 should be %f : %f", 0.0,     shift->data.F32[12][12]);
    7575        psFree(shift);
    7676        psFree(image);
     
    117117
    118118//        diag ("these require a tolerance of 100 epsilon");
    119         ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo);
    120         ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo);
     119        is_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo);
     120        is_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo);
    121121
    122122        // fractional shifts introduce smoothing,
     
    137137
    138138//        diag ("these require a tolerance of 100 epsilon");
    139         ok_float_tol (xo, 17.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 17.2, xo);
    140         ok_float_tol (yo, 14.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 14.8, yo);
     139        is_float_tol (xo, 17.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 17.2, xo);
     140        is_float_tol (yo, 14.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 14.8, yo);
    141141
    142142        psFree(shift);
     
    161161        // fractional shifts introduce smoothing,
    162162        psImage *shift = psImageShift (NULL, image, 0.2, 0.4, 0.0, PS_INTERPOLATE_BICUBE);
    163         ok_float_tol (shift->data.F32[10][10], -0.157778, 4*FLT_EPSILON, "point 10,10 should be %f : %f", -0.157778, shift->data.F32[10][10]);
    164         ok_float_tol (shift->data.F32[10][11], +0.168889, 4*FLT_EPSILON, "point 10,11 should be %f : %f", +0.168889, shift->data.F32[10][11]);
    165         ok_float_tol (shift->data.F32[10][12], -0.131111, 4*FLT_EPSILON, "point 10,12 should be %f : %f", -0.131111, shift->data.F32[10][12]);
    166         ok_float_tol (shift->data.F32[11][10], +0.142221, 4*FLT_EPSILON, "point 11,10 should be %f : %f", +0.142221, shift->data.F32[11][10]);
    167         ok_float_tol (shift->data.F32[11][11], +0.488884, 4*FLT_EPSILON, "point 11,11 should be %f : %f", +0.488884, shift->data.F32[11][11]);
    168         ok_float_tol (shift->data.F32[11][12], +0.208878, 4*FLT_EPSILON, "point 11,12 should be %f : %f", +0.208878, shift->data.F32[11][12]);
    169         ok_float_tol (shift->data.F32[12][10], -0.064500, 4*FLT_EPSILON, "point 12,10 should be %f : %f", -0.064500, shift->data.F32[12][10]);
    170         ok_float_tol (shift->data.F32[12][11], +0.302066, 4*FLT_EPSILON, "point 12,11 should be %f : %f", +0.302066, shift->data.F32[12][11]);
    171         ok_float_tol (shift->data.F32[12][12], +0.041884, 4*FLT_EPSILON, "point 12,12 should be %f : %f", +0.041884, shift->data.F32[12][12]);
     163        is_float_tol (shift->data.F32[10][10], -0.157778, 4*FLT_EPSILON, "point 10,10 should be %f : %f", -0.157778, shift->data.F32[10][10]);
     164        is_float_tol (shift->data.F32[10][11], +0.168889, 4*FLT_EPSILON, "point 10,11 should be %f : %f", +0.168889, shift->data.F32[10][11]);
     165        is_float_tol (shift->data.F32[10][12], -0.131111, 4*FLT_EPSILON, "point 10,12 should be %f : %f", -0.131111, shift->data.F32[10][12]);
     166        is_float_tol (shift->data.F32[11][10], +0.142221, 4*FLT_EPSILON, "point 11,10 should be %f : %f", +0.142221, shift->data.F32[11][10]);
     167        is_float_tol (shift->data.F32[11][11], +0.488884, 4*FLT_EPSILON, "point 11,11 should be %f : %f", +0.488884, shift->data.F32[11][11]);
     168        is_float_tol (shift->data.F32[11][12], +0.208878, 4*FLT_EPSILON, "point 11,12 should be %f : %f", +0.208878, shift->data.F32[11][12]);
     169        is_float_tol (shift->data.F32[12][10], -0.064500, 4*FLT_EPSILON, "point 12,10 should be %f : %f", -0.064500, shift->data.F32[12][10]);
     170        is_float_tol (shift->data.F32[12][11], +0.302066, 4*FLT_EPSILON, "point 12,11 should be %f : %f", +0.302066, shift->data.F32[12][11]);
     171        is_float_tol (shift->data.F32[12][12], +0.041884, 4*FLT_EPSILON, "point 12,12 should be %f : %f", +0.041884, shift->data.F32[12][12]);
    172172        psFree(shift);
    173173        psFree(image);
  • trunk/psLib/test/imageops/tap_psImageShiftKernel.c

    r12513 r12607  
    2929        // integer shifts should be exact
    3030        psImage *shift = psImageShiftKernel (NULL, image, 1.0, 1.0, PS_INTERPOLATE_BILINEAR);
    31         ok_float (shift->data.F32[10][10], 0.0, "point 10,10 should be 0.0 : %f", shift->data.F32[10][10]);
    32         ok_float (shift->data.F32[10][11], 0.0, "point 10,11 should be 0.0 : %f", shift->data.F32[10][11]);
    33         ok_float (shift->data.F32[10][12], 0.0, "point 10,12 should be 0.0 : %f", shift->data.F32[10][12]);
    34         ok_float (shift->data.F32[11][10], 0.0, "point 11,10 should be 0.0 : %f", shift->data.F32[11][10]);
    35         ok_float (shift->data.F32[11][11], 1.0, "point 11,11 should be 1.0 : %f", shift->data.F32[11][11]);
    36         ok_float (shift->data.F32[11][12], 0.0, "point 11,12 should be 0.0 : %f", shift->data.F32[11][12]);
    37         ok_float (shift->data.F32[12][10], 0.0, "point 12,10 should be 0.0 : %f", shift->data.F32[12][10]);
    38         ok_float (shift->data.F32[12][11], 0.0, "point 12,11 should be 0.0 : %f", shift->data.F32[12][11]);
    39         ok_float (shift->data.F32[12][12], 0.0, "point 12,12 should be 0.0 : %f", shift->data.F32[12][12]);
     31        is_float (shift->data.F32[10][10], 0.0, "point 10,10 should be 0.0 : %f", shift->data.F32[10][10]);
     32        is_float (shift->data.F32[10][11], 0.0, "point 10,11 should be 0.0 : %f", shift->data.F32[10][11]);
     33        is_float (shift->data.F32[10][12], 0.0, "point 10,12 should be 0.0 : %f", shift->data.F32[10][12]);
     34        is_float (shift->data.F32[11][10], 0.0, "point 11,10 should be 0.0 : %f", shift->data.F32[11][10]);
     35        is_float (shift->data.F32[11][11], 1.0, "point 11,11 should be 1.0 : %f", shift->data.F32[11][11]);
     36        is_float (shift->data.F32[11][12], 0.0, "point 11,12 should be 0.0 : %f", shift->data.F32[11][12]);
     37        is_float (shift->data.F32[12][10], 0.0, "point 12,10 should be 0.0 : %f", shift->data.F32[12][10]);
     38        is_float (shift->data.F32[12][11], 0.0, "point 12,11 should be 0.0 : %f", shift->data.F32[12][11]);
     39        is_float (shift->data.F32[12][12], 0.0, "point 12,12 should be 0.0 : %f", shift->data.F32[12][12]);
    4040        psFree(shift);
    4141        psFree(image);
     
    6666        psImage *shift = psImageShiftKernel (NULL, image, 0.2, 0.4, PS_INTERPOLATE_BICUBE);
    6767//        diag("these require tolerance of 4 epsilon (why?)");
    68         ok_float_tol (shift->data.F32[10][10], 0.8*0.6, 4*FLT_EPSILON, "point 10,10 should be %f : %f", 0.8*0.6, shift->data.F32[10][10]);
    69         ok_float_tol (shift->data.F32[10][11], 0.2*0.6, 4*FLT_EPSILON, "point 10,11 should be %f : %f", 0.2*0.6, shift->data.F32[10][11]);
    70         ok_float_tol (shift->data.F32[10][12], 0.0,     4*FLT_EPSILON, "point 10,12 should be %f : %f", 0.0,     shift->data.F32[10][12]);
    71         ok_float_tol (shift->data.F32[11][10], 0.8*0.4, 4*FLT_EPSILON, "point 11,10 should be %f : %f", 0.8*0.4, shift->data.F32[11][10]);
    72         ok_float_tol (shift->data.F32[11][11], 0.2*0.4, 4*FLT_EPSILON, "point 11,11 should be %f : %f", 0.2*0.4, shift->data.F32[11][11]);
    73         ok_float_tol (shift->data.F32[11][12], 0.0,     4*FLT_EPSILON, "point 11,12 should be %f : %f", 0.0,     shift->data.F32[11][12]);
    74         ok_float_tol (shift->data.F32[12][10], 0.0,     4*FLT_EPSILON, "point 12,10 should be %f : %f", 0.0,     shift->data.F32[12][10]);
    75         ok_float_tol (shift->data.F32[12][11], 0.0,     4*FLT_EPSILON, "point 12,11 should be %f : %f", 0.0,     shift->data.F32[12][11]);
    76         ok_float_tol (shift->data.F32[12][12], 0.0,     4*FLT_EPSILON, "point 12,12 should be %f : %f", 0.0,     shift->data.F32[12][12]);
     68        is_float_tol (shift->data.F32[10][10], 0.8*0.6, 4*FLT_EPSILON, "point 10,10 should be %f : %f", 0.8*0.6, shift->data.F32[10][10]);
     69        is_float_tol (shift->data.F32[10][11], 0.2*0.6, 4*FLT_EPSILON, "point 10,11 should be %f : %f", 0.2*0.6, shift->data.F32[10][11]);
     70        is_float_tol (shift->data.F32[10][12], 0.0,     4*FLT_EPSILON, "point 10,12 should be %f : %f", 0.0,     shift->data.F32[10][12]);
     71        is_float_tol (shift->data.F32[11][10], 0.8*0.4, 4*FLT_EPSILON, "point 11,10 should be %f : %f", 0.8*0.4, shift->data.F32[11][10]);
     72        is_float_tol (shift->data.F32[11][11], 0.2*0.4, 4*FLT_EPSILON, "point 11,11 should be %f : %f", 0.2*0.4, shift->data.F32[11][11]);
     73        is_float_tol (shift->data.F32[11][12], 0.0,     4*FLT_EPSILON, "point 11,12 should be %f : %f", 0.0,     shift->data.F32[11][12]);
     74        is_float_tol (shift->data.F32[12][10], 0.0,     4*FLT_EPSILON, "point 12,10 should be %f : %f", 0.0,     shift->data.F32[12][10]);
     75        is_float_tol (shift->data.F32[12][11], 0.0,     4*FLT_EPSILON, "point 12,11 should be %f : %f", 0.0,     shift->data.F32[12][11]);
     76        is_float_tol (shift->data.F32[12][12], 0.0,     4*FLT_EPSILON, "point 12,12 should be %f : %f", 0.0,     shift->data.F32[12][12]);
    7777        psFree(shift);
    7878        psFree(image);
     
    118118
    119119//        diag ("these require a tolerance of 100 epsilon");
    120         ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo);
    121         ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo);
     120        is_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo);
     121        is_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo);
    122122
    123123        // fractional shifts introduce smoothing,
     
    137137
    138138//        diag ("these require a tolerance of 100 epsilon");
    139         ok_float_tol (xo, 17.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 17.2, xo);
    140         ok_float_tol (yo, 14.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 14.8, yo);
     139        is_float_tol (xo, 17.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 17.2, xo);
     140        is_float_tol (yo, 14.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 14.8, yo);
    141141
    142142        psFree(shift);
     
    162162        psImage *shift = psImageShiftKernel (NULL, image, 0.2, 0.4, PS_INTERPOLATE_BICUBE);
    163163//        diag ("please check these values: this kernel is very steep and ringy.  what is the right BICUBE kernel?");
    164         ok_float_tol (shift->data.F32[10][10], -1.444445, 4*FLT_EPSILON, "point 10,10 should be %f : %f", -1.444445, shift->data.F32[10][10]);
    165         ok_float_tol (shift->data.F32[10][11], -0.277778, 4*FLT_EPSILON, "point 10,11 should be %f : %f", -0.277778, shift->data.F32[10][11]);
    166         ok_float_tol (shift->data.F32[10][12], -0.777778, 4*FLT_EPSILON, "point 10,12 should be %f : %f", -0.777778, shift->data.F32[10][12]);
    167         ok_float_tol (shift->data.F32[11][10], +0.055556, 4*FLT_EPSILON, "point 11,10 should be %f : %f", +0.055556, shift->data.F32[11][10]);
    168         ok_float_tol (shift->data.F32[11][11], +1.222222, 4*FLT_EPSILON, "point 11,11 should be %f : %f", +1.222222, shift->data.F32[11][11]);
    169         ok_float_tol (shift->data.F32[11][12], +0.722222, 4*FLT_EPSILON, "point 11,12 should be %f : %f", +0.722222, shift->data.F32[11][12]);
    170         ok_float_tol (shift->data.F32[12][10], -0.111111, 4*FLT_EPSILON, "point 12,10 should be %f : %f", -0.111111, shift->data.F32[12][10]);
    171         ok_float_tol (shift->data.F32[12][11], +1.055556, 4*FLT_EPSILON, "point 12,11 should be %f : %f", +1.055556, shift->data.F32[12][11]);
    172         ok_float_tol (shift->data.F32[12][12], +0.555556, 4*FLT_EPSILON, "point 12,12 should be %f : %f", +0.555556, shift->data.F32[12][12]);
     164        is_float_tol (shift->data.F32[10][10], -1.444445, 4*FLT_EPSILON, "point 10,10 should be %f : %f", -1.444445, shift->data.F32[10][10]);
     165        is_float_tol (shift->data.F32[10][11], -0.277778, 4*FLT_EPSILON, "point 10,11 should be %f : %f", -0.277778, shift->data.F32[10][11]);
     166        is_float_tol (shift->data.F32[10][12], -0.777778, 4*FLT_EPSILON, "point 10,12 should be %f : %f", -0.777778, shift->data.F32[10][12]);
     167        is_float_tol (shift->data.F32[11][10], +0.055556, 4*FLT_EPSILON, "point 11,10 should be %f : %f", +0.055556, shift->data.F32[11][10]);
     168        is_float_tol (shift->data.F32[11][11], +1.222222, 4*FLT_EPSILON, "point 11,11 should be %f : %f", +1.222222, shift->data.F32[11][11]);
     169        is_float_tol (shift->data.F32[11][12], +0.722222, 4*FLT_EPSILON, "point 11,12 should be %f : %f", +0.722222, shift->data.F32[11][12]);
     170        is_float_tol (shift->data.F32[12][10], -0.111111, 4*FLT_EPSILON, "point 12,10 should be %f : %f", -0.111111, shift->data.F32[12][10]);
     171        is_float_tol (shift->data.F32[12][11], +1.055556, 4*FLT_EPSILON, "point 12,11 should be %f : %f", +1.055556, shift->data.F32[12][11]);
     172        is_float_tol (shift->data.F32[12][12], +0.555556, 4*FLT_EPSILON, "point 12,12 should be %f : %f", +0.555556, shift->data.F32[12][12]);
    173173
    174174        psFree(shift);
     
    216216
    217217//        diag ("these require a tolerance of 100 epsilon");
    218         ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo);
    219         ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo);
     218        is_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo);
     219        is_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo);
    220220
    221221        // fractional shifts introduce smoothing,
     
    236236
    237237//        diag ("these require a tolerance of 100 epsilon");
    238         ok_float_tol (xo, 16.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.2, xo);
    239         ok_float_tol (yo, 15.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 15.8, yo);
     238        is_float_tol (xo, 16.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.2, xo);
     239        is_float_tol (yo, 15.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 15.8, yo);
    240240
    241241        psFree(shift);
     
    260260        // fractional shifts introduce smoothing,
    261261        psImage *shift = psImageShiftKernel (NULL, image, 0.0, 0.0, PS_INTERPOLATE_GAUSS);
    262         ok_float_tol (shift->data.F32[10][10], -0.157778, 4*FLT_EPSILON, "point 10,10 should be %f : %f", -0.157778, shift->data.F32[10][10]);
    263         ok_float_tol (shift->data.F32[10][11], +0.168889, 4*FLT_EPSILON, "point 10,11 should be %f : %f", +0.168889, shift->data.F32[10][11]);
    264         ok_float_tol (shift->data.F32[10][12], -0.131111, 4*FLT_EPSILON, "point 10,12 should be %f : %f", -0.131111, shift->data.F32[10][12]);
    265         ok_float_tol (shift->data.F32[11][10], +0.142221, 4*FLT_EPSILON, "point 11,10 should be %f : %f", +0.142221, shift->data.F32[11][10]);
    266         ok_float_tol (shift->data.F32[11][11], +0.488884, 4*FLT_EPSILON, "point 11,11 should be %f : %f", +0.488884, shift->data.F32[11][11]);
    267         ok_float_tol (shift->data.F32[11][12], +0.208878, 4*FLT_EPSILON, "point 11,12 should be %f : %f", +0.208878, shift->data.F32[11][12]);
    268         ok_float_tol (shift->data.F32[12][10], -0.064500, 4*FLT_EPSILON, "point 12,10 should be %f : %f", -0.064500, shift->data.F32[12][10]);
    269         ok_float_tol (shift->data.F32[12][11], +0.302066, 4*FLT_EPSILON, "point 12,11 should be %f : %f", +0.302066, shift->data.F32[12][11]);
    270         ok_float_tol (shift->data.F32[12][12], +0.041884, 4*FLT_EPSILON, "point 12,12 should be %f : %f", +0.041884, shift->data.F32[12][12]);
     262        is_float_tol (shift->data.F32[10][10], -0.157778, 4*FLT_EPSILON, "point 10,10 should be %f : %f", -0.157778, shift->data.F32[10][10]);
     263        is_float_tol (shift->data.F32[10][11], +0.168889, 4*FLT_EPSILON, "point 10,11 should be %f : %f", +0.168889, shift->data.F32[10][11]);
     264        is_float_tol (shift->data.F32[10][12], -0.131111, 4*FLT_EPSILON, "point 10,12 should be %f : %f", -0.131111, shift->data.F32[10][12]);
     265        is_float_tol (shift->data.F32[11][10], +0.142221, 4*FLT_EPSILON, "point 11,10 should be %f : %f", +0.142221, shift->data.F32[11][10]);
     266        is_float_tol (shift->data.F32[11][11], +0.488884, 4*FLT_EPSILON, "point 11,11 should be %f : %f", +0.488884, shift->data.F32[11][11]);
     267        is_float_tol (shift->data.F32[11][12], +0.208878, 4*FLT_EPSILON, "point 11,12 should be %f : %f", +0.208878, shift->data.F32[11][12]);
     268        is_float_tol (shift->data.F32[12][10], -0.064500, 4*FLT_EPSILON, "point 12,10 should be %f : %f", -0.064500, shift->data.F32[12][10]);
     269        is_float_tol (shift->data.F32[12][11], +0.302066, 4*FLT_EPSILON, "point 12,11 should be %f : %f", +0.302066, shift->data.F32[12][11]);
     270        is_float_tol (shift->data.F32[12][12], +0.041884, 4*FLT_EPSILON, "point 12,12 should be %f : %f", +0.041884, shift->data.F32[12][12]);
    271271        psFree(shift);
    272272        psFree(image);
     
    313313
    314314//        diag ("these require a tolerance of 100 epsilon");
    315         ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo);
    316         ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo);
     315        is_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo);
     316        is_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo);
    317317
    318318        // fractional shifts introduce smoothing,
     
    333333
    334334//        diag ("these require a tolerance of 100 epsilon");
    335         ok_float_tol (xo, 16.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.2, xo);
    336         ok_float_tol (yo, 15.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 15.8, yo);
     335        is_float_tol (xo, 16.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.2, xo);
     336        is_float_tol (yo, 15.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 15.8, yo);
    337337
    338338        psFits *fits = psFitsOpen ("gauss.fits", "w");
  • trunk/psLib/test/math/tap_psPolynomialUtils_Derivatives.c

    r10848 r12607  
    4242        ok(dX->nY == 2, "new y order is %d", dX->nY);
    4343
    44         ok_float(dX->coeff[0][0], +2.0, "x^0 y^0 coeff is %f", dX->coeff[0][0]);
    45         ok_float(dX->coeff[1][0], -6.0, "x^1 y^0 coeff is %f", dX->coeff[1][0]);
    46         ok_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
     44        is_float(dX->coeff[0][0], +2.0, "x^0 y^0 coeff is %f", dX->coeff[0][0]);
     45        is_float(dX->coeff[1][0], -6.0, "x^1 y^0 coeff is %f", dX->coeff[1][0]);
     46        is_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
    4747
    4848        ok(!dX->mask[0][0], "x^0 y^0 coeff is unmasked");
     
    9191        ok(dX->nY == 2, "new y order is %d", dX->nY);
    9292
    93         ok_float(dX->coeff[0][0], +2.0, "x^0 y^0 coeff is %f", dX->coeff[0][0]);
    94         ok_float(dX->coeff[1][0], -6.0, "x^1 y^0 coeff is %f", dX->coeff[1][0]);
    95         ok_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
     93        is_float(dX->coeff[0][0], +2.0, "x^0 y^0 coeff is %f", dX->coeff[0][0]);
     94        is_float(dX->coeff[1][0], -6.0, "x^1 y^0 coeff is %f", dX->coeff[1][0]);
     95        is_float(dX->coeff[0][1], +4.0, "x^0 y^1 coeff is %f", dX->coeff[0][1]);
    9696
    9797        ok(!dX->mask[0][0], "x^0 y^0 coeff is unmasked");
     
    172172        ok(dY->nY == 1, "new y order is %d", dY->nY);
    173173
    174         ok_float(dY->coeff[0][0], +3.0, "x^0 y^0 coeff is %f", dY->coeff[0][0]);
    175         ok_float(dY->coeff[1][0], +4.0, "x^1 y^0 coeff is %f", dY->coeff[1][0]);
    176         ok_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
     174        is_float(dY->coeff[0][0], +3.0, "x^0 y^0 coeff is %f", dY->coeff[0][0]);
     175        is_float(dY->coeff[1][0], +4.0, "x^1 y^0 coeff is %f", dY->coeff[1][0]);
     176        is_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
    177177
    178178        ok(!dY->mask[0][0], "x^0 y^0 coeff is unmasked");
     
    221221        ok(dY->nY == 1, "new y order is %d", dY->nY);
    222222
    223         ok_float(dY->coeff[0][0], +3.0, "x^0 y^0 coeff is %f", dY->coeff[0][0]);
    224         ok_float(dY->coeff[1][0], +4.0, "x^1 y^0 coeff is %f", dY->coeff[1][0]);
    225         ok_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
     223        is_float(dY->coeff[0][0], +3.0, "x^0 y^0 coeff is %f", dY->coeff[0][0]);
     224        is_float(dY->coeff[1][0], +4.0, "x^1 y^0 coeff is %f", dY->coeff[1][0]);
     225        is_float(dY->coeff[0][1], -4.0, "x^0 y^1 coeff is %f", dY->coeff[0][1]);
    226226
    227227        ok(!dY->mask[0][0], "x^0 y^0 coeff is unmasked");
  • trunk/psLib/test/math/tap_psRandom.c

    r10945 r12607  
    3939#define ERROR_TOLERANCE 0.2
    4040#define VERBOSE 0
    41 # define ok_float_tol_per(VALUE,EXPECT,TOL,COMMENT, ...)\
     41# define is_float_tol_per(VALUE,EXPECT,TOL,COMMENT, ...)\
    4242ok((fabs((VALUE)-(EXPECT)) < (TOL)), COMMENT, ## __VA_ARGS__);
    4343
     
    102102
    103103        // Verify mean and stdev
    104         ok_float_tol_per(stats->sampleMean, UNIFORM_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
    105         ok_float_tol_per(stats->sampleStdev, UNIFORM_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
     104        is_float_tol_per(stats->sampleMean, UNIFORM_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
     105        is_float_tol_per(stats->sampleStdev, UNIFORM_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
    106106
    107107        skip_end();
     
    143143
    144144        // Verify mean and stdev
    145         ok_float_tol_per(stats->sampleMean, GAUSSIAN_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
    146         ok_float_tol_per(stats->sampleStdev, GAUSSIAN_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
     145        is_float_tol_per(stats->sampleMean, GAUSSIAN_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
     146        is_float_tol_per(stats->sampleStdev, GAUSSIAN_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
    147147
    148148        skip_end();
     
    185185        stats = psVectorStats(stats, rans, NULL, NULL, 0);
    186186        // Verify mean and stdev
    187         ok_float_tol_per(stats->sampleMean, POISSON_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
    188         ok_float_tol_per(stats->sampleStdev, POISSON_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
     187        is_float_tol_per(stats->sampleMean, POISSON_MEAN, ERROR_TOLERANCE, "Mean is within expected range");
     188        is_float_tol_per(stats->sampleStdev, POISSON_STDEV, ERROR_TOLERANCE, "StDev is within expected range");
    189189
    190190        skip_end();
  • trunk/psLib/test/math/tap_psSparse.c

    r12513 r12607  
    7474        dS2 = sqrt (dS2/100.0 - dS*dS);
    7575
    76         ok_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     76        is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    7777
    7878        psFree (matrix);
     
    147147        dS2 = sqrt (dS2/100.0 - dS*dS);
    148148
    149         ok_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     149        is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    150150
    151151        psFree (matrix);
     
    219219        // test the support functions: LowerProduct
    220220        fVec = psSparseBorderLowerProduct (NULL, border, xRef);
    221         ok_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
    222         ok_float (fVec->data.F32[0], 0.3, "f(0): %f", fVec->data.F32[0]);
     221        is_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
     222        is_float (fVec->data.F32[0], 0.3, "f(0): %f", fVec->data.F32[0]);
    223223        psFree (fVec);
    224224
    225225        // test the support functions: Upper Product
    226226        fVec = psSparseBorderUpperProduct (NULL, border, yRef);
    227         ok_float (fVec->n, 2.0, "f dimen: %d", fVec->n);
    228         ok_float (fVec->data.F32[0], 0.05, "f(0): %f", fVec->data.F32[0]);
    229         ok_float (fVec->data.F32[1], 0.10, "f(0): %f", fVec->data.F32[1]);
     227        is_float (fVec->n, 2.0, "f dimen: %d", fVec->n);
     228        is_float (fVec->data.F32[0], 0.05, "f(0): %f", fVec->data.F32[0]);
     229        is_float (fVec->data.F32[1], 0.10, "f(0): %f", fVec->data.F32[1]);
    230230        psFree (fVec);
    231231
    232232        // test the support functions: Square Product
    233233        fVec = psSparseBorderSquareProduct (NULL, border, yRef);
    234         ok_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
    235         ok_float (fVec->data.F32[0], 0.25, "f(0): %f", fVec->data.F32[0]);
     234        is_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
     235        is_float (fVec->data.F32[0], 0.25, "f(0): %f", fVec->data.F32[0]);
    236236        psFree (fVec);
    237237
     
    239239        psVector *gVec = NULL;
    240240        psSparseBorderMultiply (&fVec, &gVec, border, xRef, yRef);
    241         ok_float (fVec->data.F32[0], 1.15, "f(0): %f", fVec->data.F32[0]);
    242         ok_float (fVec->data.F32[1], 1.20, "f(1): %f", fVec->data.F32[1]);
    243         ok_float (gVec->data.F32[0], 0.55, "g(0): %f", gVec->data.F32[0]);
     241        is_float (fVec->data.F32[0], 1.15, "f(0): %f", fVec->data.F32[0]);
     242        is_float (fVec->data.F32[1], 1.20, "f(1): %f", fVec->data.F32[1]);
     243        is_float (gVec->data.F32[0], 0.55, "g(0): %f", gVec->data.F32[0]);
    244244
    245245        // supply the fVec and gVec data to the border
     
    263263        psVector *yFit = NULL;
    264264        psSparseBorderSolve (&xFit, &yFit, constraint, border, 4);
    265         ok_float_tol (xFit->data.F32[0], 1.0, 1e-4, "f(0): %f", xFit->data.F32[0]);
    266         ok_float_tol (xFit->data.F32[1], 1.0, 1e-4, "f(1): %f", xFit->data.F32[1]);
    267         ok_float_tol (yFit->data.F32[0], 0.5, 1e-4, "g(0): %f", yFit->data.F32[0]);
     265        is_float_tol (xFit->data.F32[0], 1.0, 1e-4, "f(0): %f", xFit->data.F32[0]);
     266        is_float_tol (xFit->data.F32[1], 1.0, 1e-4, "f(1): %f", xFit->data.F32[1]);
     267        is_float_tol (yFit->data.F32[0], 0.5, 1e-4, "g(0): %f", yFit->data.F32[0]);
    268268
    269269        psFree (xFit);
     
    321321            }
    322322        }
    323         ok_float(border->Bij->data.F32[0][0], 0.1, "set matrix element %d,%d", 0, 0);
     323        is_float(border->Bij->data.F32[0][0], 0.1, "set matrix element %d,%d", 0, 0);
    324324
    325325        // construct the Q component:
     
    381381        dS /= Nrows;
    382382        dS2 = sqrt (dS2/Nrows - dS*dS);
    383         ok_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     383        is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    384384
    385385        // measure stdev between yFit and yRef
    386386        float dY = yRef->data.F32[0] - yFit->data.F32[0];
    387387        // fprintf (stderr, "%5.3f %5.3f %5.3f %5.3f\n", gVec->data.F32[0], yRef->data.F32[0], yFit->data.F32[0], dS);
    388         ok_float_tol (dY, 0.0, 2e-4, "scatter: %.20f", dY);
     388        is_float_tol (dY, 0.0, 2e-4, "scatter: %.20f", dY);
    389389
    390390        psFree (xRef);
  • 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);
  • trunk/psLib/test/math/tap_psStats01.c

    r11420 r12607  
    88*  @author GLG, MHPCC
    99*
    10 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    11 *  @date $Date: 2007-01-30 04:41:51 $
     10*  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     11*  @date $Date: 2007-03-27 22:52:03 $
    1212*
    1313* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    6363        ok(result, "psVectorStats suceeded");
    6464        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    65         ok_float_tol(myStats->max, expectedMaxNoMaskF32, 1e-4,
     65        is_float_tol(myStats->max, expectedMaxNoMaskF32, 1e-4,
    6666                     "The max was %f, should be %f", myStats->max, expectedMaxNoMaskF32);
    6767        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    7474        ok(result, "psVectorStats suceeded");
    7575        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    76         ok_float_tol(myStats->max, expectedMaxWithMaskF32, 1e-4,
     76        is_float_tol(myStats->max, expectedMaxWithMaskF32, 1e-4,
    7777                     "The max was %f, should be %f", myStats->max, expectedMaxWithMaskF32);
    7878        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    8888        ok(result, "psVectorStats suceeded");
    8989        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    90         ok_float_tol(myStats->max, expectedMaxRangeNoMaskF32, 1e-4,
     90        is_float_tol(myStats->max, expectedMaxRangeNoMaskF32, 1e-4,
    9191                     "The max was %f, should be %f", myStats->max, expectedMaxRangeNoMaskF32);
    9292        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    101101        ok(result, "psVectorStats suceeded");
    102102        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    103         ok_float_tol(myStats->max, expectedMaxRangeWithMaskF32, 1e-4,
     103        is_float_tol(myStats->max, expectedMaxRangeWithMaskF32, 1e-4,
    104104                     "The max was %f, should be %f", myStats->max, expectedMaxRangeWithMaskF32);
    105105        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    136136        ok(result, "psVectorStats suceeded");
    137137        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    138         ok_float_tol(myStats->max, expectedMaxNoMaskS8, 1e-4,
     138        is_float_tol(myStats->max, expectedMaxNoMaskS8, 1e-4,
    139139                     "The max was %f, should be %f", myStats->max, expectedMaxNoMaskS8);
    140140        psFree(myStats);
     
    157157        ok(result, "psVectorStats suceeded");
    158158        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    159         ok_float_tol(myStats->max, expectedMaxNoMaskU16, 1e-4,
     159        is_float_tol(myStats->max, expectedMaxNoMaskU16, 1e-4,
    160160                     "The max was %f, should be %f", myStats->max, expectedMaxNoMaskU16);
    161161        psFree(myStats);
     
    178178        ok(result, "psVectorStats suceeded");
    179179        ok(!isnan(myStats->max), "psVectorStats() returned non-NAN");
    180         ok_float_tol(myStats->max, expectedMaxNoMaskF64, 1e-4,
     180        is_float_tol(myStats->max, expectedMaxNoMaskF64, 1e-4,
    181181                     "The max was %f, should be %f", myStats->max, expectedMaxNoMaskF64);
    182182        psFree(myStats);
  • trunk/psLib/test/math/tap_psStats02.c

    r11420 r12607  
    1111*  @author GLG, MHPCC
    1212*
    13 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    14 *  @date $Date: 2007-01-30 04:41:51 $
     13*  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     14*  @date $Date: 2007-03-27 22:52:03 $
    1515*
    1616* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    6767        ok(result, "psVectorStats suceeded");
    6868        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    69         ok_float_tol(myStats->min, expectedMinNoMaskF32, 1e-4,
     69        is_float_tol(myStats->min, expectedMinNoMaskF32, 1e-4,
    7070                     "The min was %f, should be %f", myStats->min, expectedMinNoMaskF32);
    7171        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    8080        ok(result, "psVectorStats suceeded");
    8181        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    82         ok_float_tol(myStats->min, expectedMinWithMaskF32, 1e-4,
     82        is_float_tol(myStats->min, expectedMinWithMaskF32, 1e-4,
    8383                     "The min was %f, should be %f", myStats->min, expectedMinWithMaskF32);
    8484        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    9494        ok(result, "psVectorStats suceeded");
    9595        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    96         ok_float_tol(myStats->min, expectedMinRangeNoMaskF32, 1e-4,
     96        is_float_tol(myStats->min, expectedMinRangeNoMaskF32, 1e-4,
    9797                     "The min was %f, should be %f", myStats->min, expectedMinRangeNoMaskF32);
    9898        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    107107        ok(result, "psVectorStats succeeded");
    108108        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    109         ok_float_tol(myStats->min, expectedMinRangeWithMaskF32, 1e-4,
     109        is_float_tol(myStats->min, expectedMinRangeWithMaskF32, 1e-4,
    110110                     "The min was %f, should be %f", myStats->min, expectedMinRangeWithMaskF32);
    111111        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    142142        ok(result, "psVectorStats succeeded");
    143143        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    144         ok_float_tol(myStats->min, expectedMinNoMaskS8, 1e-4,
     144        is_float_tol(myStats->min, expectedMinNoMaskS8, 1e-4,
    145145                     "The min was %f, should be %f", myStats->min, expectedMinNoMaskS8);
    146146        psFree(myStats);
     
    163163        ok(result, "psVectorStats succeeded");
    164164        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    165         ok_float_tol(myStats->min, expectedMinNoMaskU16, 1e-4,
     165        is_float_tol(myStats->min, expectedMinNoMaskU16, 1e-4,
    166166                     "The min was %f, should be %f", myStats->min, expectedMinNoMaskU16);
    167167        psFree(myStats);
     
    184184        ok(result, "psVectorStats succeeded");
    185185        ok(!isnan(myStats->min), "psVectorStats() returned non-NAN");
    186         ok_float_tol(myStats->min, expectedMinNoMaskF64, 1e-4,
     186        is_float_tol(myStats->min, expectedMinNoMaskF64, 1e-4,
    187187                     "The min was %f, should be %f", myStats->min, expectedMinNoMaskF64);
    188188        psFree(myStats);
  • trunk/psLib/test/math/tap_psStats03.c

    r11420 r12607  
    4444        ok(result, "psVectorStats succeeded");
    4545        ok(!isnan(myStats->sampleMedian), "psVectorStats() returned non-NAN");
    46         ok_float_tol(myStats->sampleMedian, realMedianNoMask, 1e-4,
     46        is_float_tol(myStats->sampleMedian, realMedianNoMask, 1e-4,
    4747                     "The sample median was %f, should be %f", myStats->sampleMedian, realMedianNoMask);
    4848        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    5555        ok(result, "psVectorStats succeeded");
    5656        ok(!isnan(myStats->sampleMedian), "psVectorStats() returned non-NAN");
    57         ok_float_tol(myStats->sampleMedian, realMedianWithMask, 1e-4,
     57        is_float_tol(myStats->sampleMedian, realMedianWithMask, 1e-4,
    5858                     "The sample median was %f, should be %f", myStats->sampleMedian, realMedianWithMask);
    5959        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
  • trunk/psLib/test/math/tap_psStats06.c

    r11420 r12607  
    4545        ok(result, "psVectorStats succeeded");
    4646        ok(!isnan(myStats->sampleStdev), "psVectorStats() returned non-NAN");
    47         ok_float_tol(myStats->sampleStdev, realStdevNoMask, 1e-4,
     47        is_float_tol(myStats->sampleStdev, realStdevNoMask, 1e-4,
    4848                     "The mean was %f, should be %f", myStats->sampleStdev, realStdevNoMask);
    4949        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    5656        ok(result, "psVectorStats succeeded");
    5757        ok(!isnan(myStats->sampleStdev), "psVectorStats() returned non-NAN");
    58         ok_float_tol(myStats->sampleStdev, realStdevWithMask, 1e-4,
     58        is_float_tol(myStats->sampleStdev, realStdevWithMask, 1e-4,
    5959                     "The mean was %f, should be %f", myStats->sampleStdev, realStdevWithMask);
    6060        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
  • trunk/psLib/test/math/tap_psStats08.c

    r11661 r12607  
    4545        ok(result, "psVectorStats succeeded");
    4646        ok(!isnan(myStats->sampleLQ), "psVectorStats() returned non-NAN");
    47         ok_float_tol(myStats->sampleLQ, realLQNoMask, 1e-4,
     47        is_float_tol(myStats->sampleLQ, realLQNoMask, 1e-4,
    4848                     "The sampleLQ was %f, should be %f", myStats->sampleLQ, realLQNoMask);
    4949        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    5656        ok(result, "psVectorStats succeeded");
    5757        ok(!isnan(myStats->sampleUQ), "psVectorStats() returned non-NAN");
    58         ok_float_tol(myStats->sampleUQ, realUQNoMask, 1e-4,
     58        is_float_tol(myStats->sampleUQ, realUQNoMask, 1e-4,
    5959                     "The sampleUQ was %f, should be %f", myStats->sampleUQ, realUQNoMask);
    6060        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    6767        ok(result, "psVectorStats succeeded");
    6868        ok(!isnan(myStats->sampleLQ), "psVectorStats() returned non-NAN");
    69         ok_float_tol(myStats->sampleLQ, realLQWithMask, 1e-4,
     69        is_float_tol(myStats->sampleLQ, realLQWithMask, 1e-4,
    7070                     "The sampleLQ was %f, should be %f", myStats->sampleLQ,
    7171                     realLQWithMask);
     
    7979        ok(result, "psVectorStats succeeded");
    8080        ok(!isnan(myStats->sampleUQ), "psVectorStats() returned non-NAN");
    81         ok_float_tol(myStats->sampleUQ, realUQWithMask, 1e-4,
     81        is_float_tol(myStats->sampleUQ, realUQWithMask, 1e-4,
    8282                     "The sampleUQ was %f, should be %f", myStats->sampleUQ,
    8383                     realUQWithMask);
  • trunk/psLib/test/mathtypes/tap_psImageInterpolate.c

    r12513 r12607  
    2929
    3030        value = psImagePixelInterpolate (image, 10.5, 10.5, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    31         ok_float (value, 1.0, "pixel center value - %f", value);
     31        is_float (value, 1.0, "pixel center value - %f", value);
    3232
    3333//        diag ("why do I need to have tolerances of 4epsilon or so??");
    3434        value = psImagePixelInterpolate (image, 10.9, 10.5, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    35         ok_float_tol (value, 0.6, 4.0*FLT_EPSILON, "pixel value - %.20f", value);
     35        is_float_tol (value, 0.6, 4.0*FLT_EPSILON, "pixel value - %.20f", value);
    3636
    3737        value = psImagePixelInterpolate (image, 10.5, 10.9, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    38         ok_float_tol (value, 0.6, 4.0*FLT_EPSILON, "pixel value - %.20f", value);
     38        is_float_tol (value, 0.6, 4.0*FLT_EPSILON, "pixel value - %.20f", value);
    3939
    4040        value = psImagePixelInterpolate (image, 10.1, 10.5, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    41         ok_float_tol (value, 0.6, 4.0*FLT_EPSILON, "pixel value - %.20f", value);
     41        is_float_tol (value, 0.6, 4.0*FLT_EPSILON, "pixel value - %.20f", value);
    4242
    4343        skip_end();
     
    6969
    7070        value = psImagePixelInterpolate (image, 2.5, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    71         ok_float (value, 2.5, "pixel center value - %f", value);
     71        is_float (value, 2.5, "pixel center value - %f", value);
    7272
    7373        value = psImagePixelInterpolate (image, 2.2, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    74         ok_float (value, 2.2, "coord: 2.2, 2.5, value: %f", value);
     74        is_float (value, 2.2, "coord: 2.2, 2.5, value: %f", value);
    7575
    7676        value = psImagePixelInterpolate (image, 2.8, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    77         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     77        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    7878
    7979        value = psImagePixelInterpolate (image, 2.8, 2.2, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    80         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     80        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    8181
    8282        value = psImagePixelInterpolate (image, 2.8, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    83         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     83        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    8484
    8585        value = psImagePixelInterpolate (image, 0.8, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    86         ok_float (value, 0.8, "coord: 0.8, value: %f", value);
     86        is_float (value, 0.8, "coord: 0.8, value: %f", value);
    8787
    8888        // no extrapolation
    8989        value = psImagePixelInterpolate (image, 0.3, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    90         ok_float (value, 0.5, "coord: 0.3, value: %f", value);
     90        is_float (value, 0.5, "coord: 0.3, value: %f", value);
    9191
    9292        value = psImagePixelInterpolate (image, -0.2, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    93         ok_float (value, 0.5, "coord: -0.2, value: %f", value);
     93        is_float (value, 0.5, "coord: -0.2, value: %f", value);
    9494
    9595        skip_end();
     
    121121
    122122        value = psImagePixelInterpolate (image, 2.5, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    123         ok_float (value, 2.5, "pixel center value - %f", value);
     123        is_float (value, 2.5, "pixel center value - %f", value);
    124124
    125125        value = psImagePixelInterpolate (image, 2.2, 2.2, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    126         ok_float (value, 2.2, "coord: 2.2, 2.5, value: %f", value);
     126        is_float (value, 2.2, "coord: 2.2, 2.5, value: %f", value);
    127127
    128128        value = psImagePixelInterpolate (image, 2.5, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    129         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     129        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    130130
    131131        value = psImagePixelInterpolate (image, 2.2, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    132         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     132        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    133133
    134134        value = psImagePixelInterpolate (image, 2.8, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
    135         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     135        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    136136
    137137        skip_end();
     
    163163
    164164        value = psImagePixelInterpolate (image, 2.5, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    165         ok_float (value, 2.5, "coord; 2.5, 2.5, value - %f", value);
     165        is_float (value, 2.5, "coord; 2.5, 2.5, value - %f", value);
    166166
    167167        value = psImagePixelInterpolate (image, 2.2, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    168         ok_float (value, 2.2, "coord: 2.2, 2.5, value: %f", value);
     168        is_float (value, 2.2, "coord: 2.2, 2.5, value: %f", value);
    169169
    170170        value = psImagePixelInterpolate (image, 2.8, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    171         ok_float (value, 2.8, "coord: 2.8, 2.5, value: %f", value);
     171        is_float (value, 2.8, "coord: 2.8, 2.5, value: %f", value);
    172172
    173173        value = psImagePixelInterpolate (image, 2.8, 2.2, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    174         ok_float (value, 2.8, "coord: 2.8, 2.2, value: %f", value);
     174        is_float (value, 2.8, "coord: 2.8, 2.2, value: %f", value);
    175175
    176176        value = psImagePixelInterpolate (image, 2.8, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    177         ok_float (value, 2.8, "coord: 2.8, 2.8, value: %f", value);
     177        is_float (value, 2.8, "coord: 2.8, 2.8, value: %f", value);
    178178
    179179//        diag ("coords outside of nominal range (1 < x < Nx - 2) return 'uncover'");
     
    181181        // no extrapolation: these return the 'uncover' value
    182182        value = psImagePixelInterpolate (image, 0.8, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    183         ok_float (value, 0.0, "coord: 0.8, 2.8, value: %f", value);
     183        is_float (value, 0.0, "coord: 0.8, 2.8, value: %f", value);
    184184
    185185        value = psImagePixelInterpolate (image, 0.3, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    186         ok_float (value, 0.0, "coord: 0.3, 2.8, value: %f", value);
     186        is_float (value, 0.0, "coord: 0.3, 2.8, value: %f", value);
    187187
    188188        value = psImagePixelInterpolate (image, -0.2, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    189         ok_float (value, 0.0, "coord: -0.2, 2.8, value: %f", value);
     189        is_float (value, 0.0, "coord: -0.2, 2.8, value: %f", value);
    190190
    191191        skip_end();
     
    217217
    218218        value = psImagePixelInterpolate (image, 2.5, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    219         ok_float (value, 2.5, "pixel center value - %f", value);
     219        is_float (value, 2.5, "pixel center value - %f", value);
    220220
    221221        value = psImagePixelInterpolate (image, 2.2, 2.2, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    222         ok_float (value, 2.2, "coord: 2.2, 2.5, value: %f", value);
     222        is_float (value, 2.2, "coord: 2.2, 2.5, value: %f", value);
    223223
    224224        value = psImagePixelInterpolate (image, 2.5, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    225         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     225        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    226226
    227227        value = psImagePixelInterpolate (image, 2.2, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    228         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     228        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    229229
    230230        value = psImagePixelInterpolate (image, 2.8, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    231         ok_float (value, 2.8, "coord: 2.8, value: %f", value);
     231        is_float (value, 2.8, "coord: 2.8, value: %f", value);
    232232
    233233        skip_end();
     
    259259
    260260        value = psImagePixelInterpolate (image, 2.5, 2.5, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    261         ok_float (value, 4.0625, "pixel center value - %f", value);
     261        is_float (value, 4.0625, "pixel center value - %f", value);
    262262
    263263        value = psImagePixelInterpolate (image, 2.2, 2.2, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    264         ok_float (value, 3.41, "coord: 2.2, 2.5, value: %f", value);
     264        is_float (value, 3.41, "coord: 2.2, 2.5, value: %f", value);
    265265
    266266        value = psImagePixelInterpolate (image, 2.5, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    267         ok_float (value, 4.3625002, "coord: 2.5, 2.8, value: %f", value);
     267        is_float (value, 4.3625002, "coord: 2.5, 2.8, value: %f", value);
    268268
    269269        value = psImagePixelInterpolate (image, 2.2, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    270         ok_float (value, 4.010000229, "coord: 2.2, 2.8, value: %f", value);
     270        is_float (value, 4.010000229, "coord: 2.2, 2.8, value: %f", value);
    271271
    272272        value = psImagePixelInterpolate (image, 2.8, 2.8, NULL, 0, 0.0, PS_INTERPOLATE_BICUBE);
    273         ok_float (value, 4.75999975, "coord: 2.8, 2.8, value: %f", value);
     273        is_float (value, 4.75999975, "coord: 2.8, 2.8, value: %f", value);
    274274
    275275        skip_end();
  • trunk/psLib/test/pstap/src/pstap.h

    r12410 r12607  
    2525
    2626// use to test the value of a float
    27 # define ok_float(VALUE, EXPECT, ...) \
     27# define is_float(VALUE, EXPECT, ...) \
    2828{ \
    2929    bool status = false; \
     
    4242
    4343// use to test the value of a float within a defined tolerance
    44 # define ok_float_tol(VALUE,EXPECT,TOL,...)\
     44# define is_float_tol(VALUE,EXPECT,TOL,...)\
    4545{ \
    4646    bool status = false; \
     
    5959
    6060// use to test the value of a double
    61 # define ok_double(VALUE,EXPECT,...)\
     61# define is_double(VALUE,EXPECT,...)\
    6262{ \
    6363    bool status = false; \
     
    7676
    7777// use to test the value of a double
    78 # define ok_double_tol(VALUE,EXPECT,TOL, ...)\
     78# define is_double_tol(VALUE,EXPECT,TOL, ...)\
    7979{ \
    8080    bool status = false; \
     
    9292
    9393
    94 # define ok_str(VALUE, EXPECT, ...) \
     94# define is_str(VALUE, EXPECT, ...) \
    9595{ \
    9696    int cmp = (strcmp(VALUE, EXPECT) == 0); \
     
    103103
    104104
    105 # define ok_strn(VALUE, EXPECT, N, ...)\
     105# define is_strn(VALUE, EXPECT, N, ...)\
    106106{ \
    107107    int cmp = (strncmp(VALUE, EXPECT, N) == 0); \
  • trunk/psLib/test/sys/tap_psString.c

    r12513 r12607  
    2020 *  @author  Eric Van Alst, MHPCC
    2121 *
    22  *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
    23  *  @date  $Date: 2007-03-20 03:57:25 $
     22 *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
     23 *  @date  $Date: 2007-03-27 22:52:03 $
    2424 *
    2525 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    313313    // test null-op
    314314    psStringAppend(&str, "%s", "");
    315     ok_str(str, STR_0, "Failed test point");
     315    is_str(str, STR_0, "Failed test point");
    316316    psFree(str);
    317317
  • trunk/psLib/test/types/tap_psLookupTable_all.c

    r12385 r12607  
    273273        skip_start(  vec == NULL, 1,
    274274                     "Skipping 1 tests because psLookupTableInterpolateAll failed");
    275         ok_double(vec->data.F64[0], 1.0,
     275        is_double(vec->data.F64[0], 1.0,
    276276                  "psLookupTableInterpolateAll:     return correct output vector for valid inputs.");
    277277        skip_end();
  • trunk/psLib/test/types/tap_psMetadataConfigFormat.c

    r12472 r12607  
    102102        char configTest[32];
    103103        strncpy(configTest, "time             TAI       NULL", 31);
    104         ok_strn(configTest, out, 31,
     104        is_strn(configTest, out, 31,
    105105                "psMetadataConfigFormat:         return correct output string.");
    106106        psFree(time);
     
    124124        char configTest[62];
    125125        strncpy(configTest, "new_S32 MULTI\nnew_S32          S32       666", 61);
    126         ok_strn(configTest, out, strlen(configTest),
     126        is_strn(configTest, out, strlen(configTest),
    127127                "psMetadataConfigFormat:         return correct output string.");
    128128        psFree(out);
     
    150150                "\nf32              S32       666              # f32_3"
    151151                "\nf32              S32       665              # f32_2", 200);
    152         ok_strn(configTest, out, strlen(configTest),
     152        is_strn(configTest, out, strlen(configTest),
    153153                "psMetadataConfigFormat:         return correct output string.");
    154154        psFree(out);
  • trunk/psLib/test/types/tap_psMetadataConfigParse.c

    r12473 r12607  
    6161        ok(item->type == PS_TYPE_S32, "return correcot metdataItem type");
    6262        is_int(item->data.S32, 666, "return correct metadataItem data");
    63         ok_str(item->name, "new", "return correct metadataItem name");
    64         ok_str(item->comment, "", "return correct metadataItem comment");
     63        is_str(item->name, "new", "return correct metadataItem name");
     64        is_str(item->comment, "", "return correct metadataItem comment");
    6565        skip_end();
    6666
     
    8181                "Skipping 1 tests because metadata container is empty!");
    8282        ok(item->type == PS_DATA_F64, "return correct metadataItem type");
    83         ok_float(6.28, item->data.F64, "return correct metadataItem data");
    84         ok_str(item->name, "item4", "return correct metadataItem name");
    85         ok_str(item->comment, "", "return correct metadataItem comment");
     83        is_float(6.28, item->data.F64, "return correct metadataItem data");
     84        is_str(item->name, "item4", "return correct metadataItem name");
     85        is_str(item->comment, "", "return correct metadataItem comment");
    8686        skip_end();
    8787
     
    106106        ok(item->type == PS_TYPE_S8, "metdataItem type");
    107107        is_int(item->data.S8, 3, "metdataItem value");
    108         ok_str(item->name, "item8", "return correct metadataItem name");
    109         ok_str(item->comment, "", "return correct metadataItem comment");
     108        is_str(item->name, "item8", "return correct metadataItem name");
     109        is_str(item->comment, "", "return correct metadataItem comment");
    110110        skip_end();
    111111        psFree(md);
     
    128128        is_int(((psVector*)(item->data.V))->data.U8[0], 1,
    129129                "return correct metadataItem data (Vector)");
    130         ok_str(item->name, "vector6",
     130        is_str(item->name, "vector6",
    131131                "return correct metadataItem name (Vector)");
    132         ok_str(item->comment, "I am a vector", "return correct metadataItem comment");
     132        is_str(item->comment, "I am a vector", "return correct metadataItem comment");
    133133        skip_end();
    134134
  • trunk/psLib/test/types/tap_psMetadataConfigPrint.c

    r10701 r12607  
    9696        fread(fileStr2, 1, 31, mdcfg);
    9797
    98         ok_strn(fileStr2, "\nnew S32          S32       666 ", 30,
     98        is_strn(fileStr2, "\nnew S32          S32       666 ", 30,
    9999                "return correct output.");
    100100
  • trunk/psLib/test/types/tap_psMetadataConfigWrite.c

    r10698 r12607  
    6262        strncpy(configTest,
    6363                "item1-1          BOOL      T                # I am a boolean", 60);
    64         ok_strn(configTest, fileStr, 60,
     64        is_strn(configTest, fileStr, 60,
    6565                "return correct output.");
    6666        fclose(mdcfg);
  • trunk/psLib/test/types/tap_psMetadataConfig_input.c

    r12477 r12607  
    8888        psMetadataItem *item = psMetadataGet(md, PS_LIST_HEAD);
    8989        // XXX shouldn't assume item isn't NULL
    90         ok_str(item->name, "item1", "metadataItem name");
     90        is_str(item->name, "item1", "metadataItem name");
    9191        ok(item->type == PS_DATA_BOOL, "metadataItem type");
    9292        is_bool(item->data.B, true, "metdataItem value");
    93         ok_str(item->comment, "I am a boolean", "metadataItem comment.");
     93        is_str(item->comment, "I am a boolean", "metadataItem comment.");
    9494
    9595        // look at the last item
    9696        item = psMetadataGet(md, PS_LIST_TAIL);
    9797        // XXX shouldn't assume item isn't NULL
    98         ok_str(item->name, "M2", "metadataItem name");
     98        is_str(item->name, "M2", "metadataItem name");
    9999        ok(item->type == PS_DATA_S32, "metdataItem type");
    100100        is_int(item->data.S32, 666, "metdataItem value");
    101         ok_str(item->comment, "this line is \"GOOD\" but parsed in the top level", "metadataItem comment.");
     101        is_str(item->comment, "this line is \"GOOD\" but parsed in the top level", "metadataItem comment.");
    102102
    103103        skip_end();
     
    123123        // note that item1 gets added to the "tail" of the metdata was it's
    124124        // replaced
    125         ok_str(item->name, "item2", "metadataItem name");
     125        is_str(item->name, "item2", "metadataItem name");
    126126        ok(item->type == PS_DATA_S32, "metdataItem type");
    127127        is_bool(item->data.S32, 55, "metadataItem value");
    128         ok_str(item->comment, "I am int", "metadataItem value");
     128        is_str(item->comment, "I am int", "metadataItem value");
    129129
    130130        // look at the last item
     
    132132        // XXX shouldn't assume item isn't NULL
    133133        // meta1 is from "the bad section"
    134         ok_str(item->name, "meta1", "metadataItem name");
     134        is_str(item->name, "meta1", "metadataItem name");
    135135        ok(item->type == PS_DATA_METADATA, "metadataItem type");
    136136
    137         ok_str(item->comment, "", "metadataItem comment");
     137        is_str(item->comment, "", "metadataItem comment");
    138138
    139139        skip_end();
  • trunk/psLib/test/types/tap_psMetadataItemParse.c

    r10822 r12607  
    110110             "psMetadataItem input." );
    111111        //Return 1.666 for string with "1.666"
    112         ok_float( psMetadataItemParseF32(itemString2), 1.666,
     112        is_float( psMetadataItemParseF32(itemString2), 1.666,
    113113                  "psMetadataItemParse:     return 1.666 in F32 for string-item with "
    114114                  "value '1.666'." );
    115115        //Return 0.0 for F32 value 0.0
    116         ok_float( psMetadataItemParseF32(itemF32), 0.0,
     116        is_float( psMetadataItemParseF32(itemF32), 0.0,
    117117                  "psMetadataItemParse:     return 0.0 in F32 for F32-item with "
    118118                  "value '0.0'." );
    119119        //Return 0.5 for F64 value 0.5
    120         ok_float( psMetadataItemParseF32(itemF64), 0.5,
     120        is_float( psMetadataItemParseF32(itemF64), 0.5,
    121121                  "psMetadataItemParse:     return 0.5 in F32 for F64-item with "
    122122                  "value '0.5'." );
    123123        //Return 1.0 for S8 value 1
    124         ok_float( psMetadataItemParseF32(itemS8), 1.0,
     124        is_float( psMetadataItemParseF32(itemS8), 1.0,
    125125                  "psMetadataItemParse:     return 1.0 in F32 for S8-item with "
    126126                  "value '1'." );
    127127        //Return 0.0 for S16 value 0
    128         ok_float( psMetadataItemParseF32(itemS16), 0.0,
     128        is_float( psMetadataItemParseF32(itemS16), 0.0,
    129129                  "psMetadataItemParse:     return 0.0 in F32 for S16-item with "
    130130                  "value '0'." );
    131131        //Return 1.0 for S32 value 1
    132         ok_float( psMetadataItemParseF32(itemS32), 1.0,
     132        is_float( psMetadataItemParseF32(itemS32), 1.0,
    133133                  "psMetadataItemParse:     return 1.0 in F32 for S32-item with "
    134134                  "value '1'." );
    135135        //Return 2.0 for U8 value 2
    136         ok_float( psMetadataItemParseF32(itemU8), 2.0,
     136        is_float( psMetadataItemParseF32(itemU8), 2.0,
    137137                  "psMetadataItemParse:     return 2.0 in F32 for U8-item with "
    138138                  "value '2'." );
    139139        //Return 0.0 for U16 value 0
    140         ok_float( psMetadataItemParseF32(itemU16), 0.0,
     140        is_float( psMetadataItemParseF32(itemU16), 0.0,
    141141                  "psMetadataItemParse:     return 0.0 in F32 for U16-item with "
    142142                  "value '0'." );
    143143        //Return 1.0 for U32 value 1
    144         ok_float( psMetadataItemParseF32(itemU32), 1.0,
     144        is_float( psMetadataItemParseF32(itemU32), 1.0,
    145145                  "psMetadataItemParse:     return 1.0 in F32 for U32-item with "
    146146                  "value '1'." );
     
    157157             "psMetadataItem input." );
    158158        //Return 1.666 for string with "1.666"
    159         ok_double_tol( psMetadataItemParseF64(itemString2), 1.666, 0.00001,
     159        is_double_tol( psMetadataItemParseF64(itemString2), 1.666, 0.00001,
    160160                       "psMetadataItemParse:     return 1.666 in F64 for string-item with "
    161161                       "value '1.666'." );
    162162        //Return 0.0 for F32 value 0.0
    163         ok_double( psMetadataItemParseF64(itemF32), 0.0,
     163        is_double( psMetadataItemParseF64(itemF32), 0.0,
    164164                   "psMetadataItemParse:     return 0.0 in F64 for F32-item with "
    165165                   "value '0.0'." );
    166166        //Return 0.5 for F64 value 0.5
    167         ok_double( psMetadataItemParseF64(itemF64), 0.5,
     167        is_double( psMetadataItemParseF64(itemF64), 0.5,
    168168                   "psMetadataItemParse:     return 0.5 in F64 for F64-item with "
    169169                   "value '0.5'." );
    170170        //Return 1.0 for S8 value 1
    171         ok_double( psMetadataItemParseF64(itemS8), 1.0,
     171        is_double( psMetadataItemParseF64(itemS8), 1.0,
    172172                   "psMetadataItemParse:     return 1.0 in F64 for S8-item with "
    173173                   "value '1'." );
    174174        //Return 0.0 for S16 value 0
    175         ok_double( psMetadataItemParseF64(itemS16), 0.0,
     175        is_double( psMetadataItemParseF64(itemS16), 0.0,
    176176                   "psMetadataItemParse:     return 0.0 in F64 for S16-item with "
    177177                   "value '0'." );
    178178        //Return 1.0 for S32 value 1
    179         ok_double( psMetadataItemParseF64(itemS32), 1.0,
     179        is_double( psMetadataItemParseF64(itemS32), 1.0,
    180180                   "psMetadataItemParse:     return 1.0 in F64 for S32-item with "
    181181                   "value '1'." );
    182182        //Return 2.0 for U8 value 2
    183         ok_double( psMetadataItemParseF64(itemU8), 2.0,
     183        is_double( psMetadataItemParseF64(itemU8), 2.0,
    184184                   "psMetadataItemParse:     return 2.0 in F64 for U8-item with "
    185185                   "value '2'." );
    186186        //Return 0.0 for U16 value 0
    187         ok_double( psMetadataItemParseF64(itemU16), 0.0,
     187        is_double( psMetadataItemParseF64(itemU16), 0.0,
    188188                   "psMetadataItemParse:     return 0.0 in F64 for U16-item with "
    189189                   "value '0'." );
    190190        //Return 1.0 for U32 value 1
    191         ok_double( psMetadataItemParseF64(itemU32), 1.0,
     191        is_double( psMetadataItemParseF64(itemU32), 1.0,
    192192                   "psMetadataItemParse:     return 1.0 in F64 for U32-item with "
    193193                   "value '1'." );
     
    448448        //Return "true" for STRING of value "true"
    449449        psString tempString = psMetadataItemParseString(itemString1);
    450         ok_strn( tempString, "true", 6,
     450        is_strn( tempString, "true", 6,
    451451                 "psMetadataItemParse:    return 'true' in STRING for STRING with "
    452452                 "value 'true'." );
     
    455455        //Return 0.000000 for F32 of value 0.000000
    456456        tempString = psMetadataItemParseString(itemF32);
    457         ok_strn( tempString, "0.000000", 4,
     457        is_strn( tempString, "0.000000", 4,
    458458                 "psMetadataItemParse:    return '0.000000' in STRING for F32 with "
    459459                 "value '0.000000'.   (actual result=%s)", tempString);
     
    462462        //Return 0.500000 for F64 value 0.5
    463463        tempString = psMetadataItemParseString(itemF64);
    464         ok_strn( tempString, "0.500000", 10,
     464        is_strn( tempString, "0.500000", 10,
    465465                 "psMetadataItemParse:    return '0.500000' in STRING for F64 with "
    466466                 "value '0.5'.   (actual result=%s)", tempString);
     
    469469        //Return 1 for S8 value 1
    470470        tempString = psMetadataItemParseString(itemS8);
    471         ok_strn( tempString, "1", 3,
     471        is_strn( tempString, "1", 3,
    472472                 "psMetadataItemParse:    return '1' in STRING for S8 with "
    473473                 "value '1'.   (actual result=%s)", tempString);
     
    476476        //Return 0 for S16 value 0
    477477        tempString = psMetadataItemParseString(itemS16);
    478         ok_strn( tempString, "0", 3,
     478        is_strn( tempString, "0", 3,
    479479                 "psMetadataItemParse:    return '0' in STRING for S8 with "
    480480                 "value '0'.   (actual result=%s)", tempString);
     
    483483        //Return 1 for S32 value 1
    484484        tempString = psMetadataItemParseString(itemS32);
    485         ok_strn( tempString, "1", 3,
     485        is_strn( tempString, "1", 3,
    486486                 "psMetadataItemParse:    return '1' in STRING for S8 with "
    487487                 "value '1'.   (actual result=%s)", tempString);
     
    490490        //Return 2 for U8 value 2
    491491        tempString = psMetadataItemParseString(itemU8);
    492         ok_strn( tempString, "2", 3,
     492        is_strn( tempString, "2", 3,
    493493                 "psMetadataItemParse:    return '2' in STRING for S8 with "
    494494                 "value '2'.   (actual result=%s)", tempString);
     
    497497        //Return 0 for U16 value 0
    498498        tempString = psMetadataItemParseString(itemU16);
    499         ok_strn( tempString, "0", 3,
     499        is_strn( tempString, "0", 3,
    500500                 "psMetadataItemParse:    return '0' in STRING for S8 with "
    501501                 "value '0'.   (actual result=%s)", tempString);
     
    504504        //Return 1 for U32 value 1
    505505        tempString = psMetadataItemParseString(itemU32);
    506         ok_strn( tempString, "1", 3,
     506        is_strn( tempString, "1", 3,
    507507                 "psMetadataItemParse:    return '1' in STRING for S8 with "
    508508                 "value '1'.   (actual result=%s)", tempString);
  • trunk/psLib/test/types/tap_psMetadata_copying.c

    r12476 r12607  
    221221
    222222        ok(copy->type == PS_DATA_S64, "item type");
    223         ok_str(copy->name, "itemS64", "item name");
     223        is_str(copy->name, "itemS64", "item name");
    224224        is_long(copy->data.S64, 4, "item data");
    225         ok_str(copy->comment, "", "item comment");
     225        is_str(copy->comment, "", "item comment");
    226226
    227227        psFree(copy);
  • trunk/psLib/test/types/tap_psMetadata_polynomials.c

    r10822 r12607  
    6969        ok(status,
    7070           "psPolynomial1DtoMetadata:      found VAL_X00");
    71         ok_double(val, 1.1,
     71        is_double(val, 1.1,
    7272                  "psPolynomial1DtoMetadata:      VAL_X00 is %lf", val);
    7373
     
    7575        ok(status,
    7676           "psPolynomial1DtoMetadata:      found VAL_X01");
    77         ok_double(val, 2.2,
     77        is_double(val, 2.2,
    7878                  "psPolynomial1DtoMetadata:      VAL_X01 is %lf", val);
    7979        skip_end();
     
    278278        ok(status,
    279279           "psPolynomial2DtoMetadata:     found VAL_X00_Y00");
    280         ok_double(val, 1.1,
     280        is_double(val, 1.1,
    281281                  "psPolynomial2DtoMetadata:     VAL_X00_Y00 is %lf", val);
    282282
     
    284284        ok(status,
    285285           "psPolynomial2DtoMetadata:     found VAL_X01_Y01");
    286         ok_double(val, 4.4,
     286        is_double(val, 4.4,
    287287                  "psPolynomial2DtoMetadata:     VAL_X01_Y01 is %lf", val);
    288288
Note: See TracChangeset for help on using the changeset viewer.