IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/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);
Note: See TracChangeset for help on using the changeset viewer.