IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

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

Location:
trunk/psLib/test/astro
Files:
6 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
Note: See TracChangeset for help on using the changeset viewer.