IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 2, 2005, 9:41:31 AM (21 years ago)
Author:
evanalst
Message:

Update psSpherePrecess test cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astronomy/tst_psCoord.c

    r3360 r3365  
    66*  @author GLG, MHPCC
    77*
    8 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2005-03-02 03:40:37 $
     8*  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2005-03-02 19:41:31 $
    1010*
    11 *  XXX: Must test psSpherePrecess.
    1211*  XXX: THe psProject() and psDeproject() functions do not work fully.  They
    1312*  are not tested here.  The SphereGet/SetOffset() code that rely on them
     
    990989    // Calculate precess
    991990    outputCoord = psSpherePrecess(inputCoord, fromTime, toTime);
     991    // Verify return is not NULL
     992    if(outputCoord == NULL) {
     993        psError(PS_ERR_UNKNOWN,true,"Returned NULL not expected");
     994        return 1;
     995    }
    992996    // Verify return with expected values
    993997    if( fabs(outputCoord->r - SPHERE_PRECESS_TP1_EXPECT_R) > ERROR_TOL) {
    994998        psError(PS_ERR_UNKNOWN,true,"Precess r = %lg not equal to expected = %lg",
    995999                outputCoord->r,SPHERE_PRECESS_TP1_EXPECT_R);
    996         return 1;
     1000        return 2;
    9971001    }
    9981002    if( fabs(outputCoord->d - SPHERE_PRECESS_TP1_EXPECT_D) > ERROR_TOL) {
    9991003        psError(PS_ERR_UNKNOWN,true,"Precess d = %lg not equal to expected = %lg",
    10001004                outputCoord->d,SPHERE_PRECESS_TP1_EXPECT_D);
    1001         return 2;
     1005        return 3;
    10021006    }
    10031007    psFree(outputCoord);
     
    10111015    // Calculate precess
    10121016    outputCoord = psSpherePrecess(inputCoord, fromTime, toTime);
     1017    // Verify return is not NULL
     1018    if(outputCoord == NULL) {
     1019        psError(PS_ERR_UNKNOWN,true,"Returned NULL not expected");
     1020        return 4;
     1021    }
    10131022    // Verify return with expected values
    10141023    if( fabs(outputCoord->r - SPHERE_PRECESS_TP2_EXPECT_R) > ERROR_TOL) {
    10151024        psError(PS_ERR_UNKNOWN,true,"Precess r = %lg not equal to expected = %lg",
    10161025                outputCoord->r,SPHERE_PRECESS_TP2_EXPECT_R);
    1017         return 3;
     1026        return 5;
    10181027    }
    10191028    if( fabs(outputCoord->d - SPHERE_PRECESS_TP2_EXPECT_D) > ERROR_TOL) {
    10201029        psError(PS_ERR_UNKNOWN,true,"Precess d = %lg not equal to expected = %lg",
    10211030                outputCoord->d,SPHERE_PRECESS_TP2_EXPECT_D);
    1022         return 4;
     1031        return 6;
    10231032    }
    10241033    psFree(outputCoord);
     
    10321041    // Calculate precess
    10331042    outputCoord = psSpherePrecess(inputCoord, fromTime, toTime);
     1043    // Verify return is not NULL
     1044    if(outputCoord == NULL) {
     1045        psError(PS_ERR_UNKNOWN,true,"Returned NULL not expected");
     1046        return 7;
     1047    }
    10341048    // Verify return with expected values
    10351049    if( fabs(outputCoord->r - SPHERE_PRECESS_TP3_EXPECT_R) > ERROR_TOL) {
    10361050        psError(PS_ERR_UNKNOWN,true,"Precess r = %lg not equal to expected = %lg",
    10371051                outputCoord->r,SPHERE_PRECESS_TP3_EXPECT_R);
    1038         return 5;
     1052        return 8;
    10391053    }
    10401054    if( fabs(outputCoord->d - SPHERE_PRECESS_TP3_EXPECT_D) > ERROR_TOL) {
    10411055        psError(PS_ERR_UNKNOWN,true,"Precess d = %lg not equal to expected = %lg",
    10421056                outputCoord->d,SPHERE_PRECESS_TP3_EXPECT_D);
    1043         return 6;
     1057        return 9;
    10441058    }
    10451059    psFree(outputCoord);
     
    10501064    if(outputCoord != NULL) {
    10511065        psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input");
    1052         return 7;
     1066        return 10;
    10531067    }
    10541068
     
    10581072    if(outputCoord != NULL) {
    10591073        psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input");
    1060         return 8;
     1074        return 11;
    10611075    }
    10621076
     
    10661080    if(outputCoord != NULL) {
    10671081        psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input");
    1068         return 9;
     1082        return 12;
    10691083    }
    10701084
Note: See TracChangeset for help on using the changeset viewer.