Changeset 3365 for trunk/psLib/test/astronomy/tst_psCoord.c
- Timestamp:
- Mar 2, 2005, 9:41:31 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astronomy/tst_psCoord.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astronomy/tst_psCoord.c
r3360 r3365 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.2 0$ $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 $ 10 10 * 11 * XXX: Must test psSpherePrecess.12 11 * XXX: THe psProject() and psDeproject() functions do not work fully. They 13 12 * are not tested here. The SphereGet/SetOffset() code that rely on them … … 990 989 // Calculate precess 991 990 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 } 992 996 // Verify return with expected values 993 997 if( fabs(outputCoord->r - SPHERE_PRECESS_TP1_EXPECT_R) > ERROR_TOL) { 994 998 psError(PS_ERR_UNKNOWN,true,"Precess r = %lg not equal to expected = %lg", 995 999 outputCoord->r,SPHERE_PRECESS_TP1_EXPECT_R); 996 return 1;1000 return 2; 997 1001 } 998 1002 if( fabs(outputCoord->d - SPHERE_PRECESS_TP1_EXPECT_D) > ERROR_TOL) { 999 1003 psError(PS_ERR_UNKNOWN,true,"Precess d = %lg not equal to expected = %lg", 1000 1004 outputCoord->d,SPHERE_PRECESS_TP1_EXPECT_D); 1001 return 2;1005 return 3; 1002 1006 } 1003 1007 psFree(outputCoord); … … 1011 1015 // Calculate precess 1012 1016 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 } 1013 1022 // Verify return with expected values 1014 1023 if( fabs(outputCoord->r - SPHERE_PRECESS_TP2_EXPECT_R) > ERROR_TOL) { 1015 1024 psError(PS_ERR_UNKNOWN,true,"Precess r = %lg not equal to expected = %lg", 1016 1025 outputCoord->r,SPHERE_PRECESS_TP2_EXPECT_R); 1017 return 3;1026 return 5; 1018 1027 } 1019 1028 if( fabs(outputCoord->d - SPHERE_PRECESS_TP2_EXPECT_D) > ERROR_TOL) { 1020 1029 psError(PS_ERR_UNKNOWN,true,"Precess d = %lg not equal to expected = %lg", 1021 1030 outputCoord->d,SPHERE_PRECESS_TP2_EXPECT_D); 1022 return 4;1031 return 6; 1023 1032 } 1024 1033 psFree(outputCoord); … … 1032 1041 // Calculate precess 1033 1042 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 } 1034 1048 // Verify return with expected values 1035 1049 if( fabs(outputCoord->r - SPHERE_PRECESS_TP3_EXPECT_R) > ERROR_TOL) { 1036 1050 psError(PS_ERR_UNKNOWN,true,"Precess r = %lg not equal to expected = %lg", 1037 1051 outputCoord->r,SPHERE_PRECESS_TP3_EXPECT_R); 1038 return 5;1052 return 8; 1039 1053 } 1040 1054 if( fabs(outputCoord->d - SPHERE_PRECESS_TP3_EXPECT_D) > ERROR_TOL) { 1041 1055 psError(PS_ERR_UNKNOWN,true,"Precess d = %lg not equal to expected = %lg", 1042 1056 outputCoord->d,SPHERE_PRECESS_TP3_EXPECT_D); 1043 return 6;1057 return 9; 1044 1058 } 1045 1059 psFree(outputCoord); … … 1050 1064 if(outputCoord != NULL) { 1051 1065 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input"); 1052 return 7;1066 return 10; 1053 1067 } 1054 1068 … … 1058 1072 if(outputCoord != NULL) { 1059 1073 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input"); 1060 return 8;1074 return 11; 1061 1075 } 1062 1076 … … 1066 1080 if(outputCoord != NULL) { 1067 1081 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input"); 1068 return 9;1082 return 12; 1069 1083 } 1070 1084
Note:
See TracChangeset
for help on using the changeset viewer.
