Changeset 2201 for trunk/psLib/test/astronomy/tst_psCoord.c
- Timestamp:
- Oct 26, 2004, 12:51:56 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astronomy/tst_psCoord.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astronomy/tst_psCoord.c
r2199 r2201 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-10-26 2 1:57:32$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-10-26 22:51:56 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 16 16 17 17 static int test1( void ); 18 static int test1b( void ); 19 static int test1c( void ); 18 20 static int test2( void ); 19 21 static int test3( void ); … … 30 32 testDescription tests[] = { 31 33 {test1, 0000, "psSphereTransformAlloc()", 0, false}, 34 {test1b, 0000, "psPlaneTransformAlloc()", 0, false}, 35 {test1c, 0000, "psPlaneDistortAlloc()", 0, false}, 32 36 {test2, 0000, "psPlaneTransformApply()", 0, false}, 33 37 {test3, 0000, "psPlaneDistortApply()", 0, false}, … … 111 115 112 116 psFree(myST); 117 return(testStatus); 118 } 119 120 #define NW_TERMS 2 121 #define NX_TERMS 3 122 #define NY_TERMS 4 123 #define NZ_TERMS 5 124 int test1b( void ) 125 { 126 int testStatus = 0; 127 psPlaneTransform *myPT = psPlaneTransformAlloc(NX_TERMS, NY_TERMS); 128 129 if (myPT->x->nX != NX_TERMS) { 130 printf("ERROR: myPT->x->nX is %d, should be %d\n", myPT->x->nX, NX_TERMS); 131 testStatus = 1; 132 } 133 if (myPT->y->nX != NX_TERMS) { 134 printf("ERROR: myPT->y->nX is %d, should be %d\n", myPT->y->nX, NX_TERMS); 135 testStatus = 1; 136 } 137 138 if (myPT->x->nY != NY_TERMS) { 139 printf("ERROR: myPT->x->nY is %d, should be %d\n", myPT->x->nY, NY_TERMS); 140 testStatus = 1; 141 } 142 if (myPT->y->nY != NY_TERMS) { 143 printf("ERROR: myPT->y->nY is %d, should be %d\n", myPT->y->nY, NY_TERMS); 144 testStatus = 1; 145 } 146 147 psFree(myPT); 148 return(testStatus); 149 } 150 int test1c( void ) 151 { 152 int testStatus = 0; 153 psPlaneDistort *myPD = psPlaneDistortAlloc(NW_TERMS, NX_TERMS, NY_TERMS, NZ_TERMS); 154 155 if (myPD->x->nW != NW_TERMS) { 156 printf("ERROR: myPD->x->nW is %d, should be %d\n", myPD->x->nW, NW_TERMS); 157 testStatus = 1; 158 } 159 if (myPD->y->nW != NW_TERMS) { 160 printf("ERROR: myPD->y->nW is %d, should be %d\n", myPD->y->nW, NW_TERMS); 161 testStatus = 1; 162 } 163 164 if (myPD->x->nX != NX_TERMS) { 165 printf("ERROR: myPD->x->nX is %d, should be %d\n", myPD->x->nX, NX_TERMS); 166 testStatus = 1; 167 } 168 if (myPD->y->nX != NX_TERMS) { 169 printf("ERROR: myPD->y->nX is %d, should be %d\n", myPD->y->nX, NX_TERMS); 170 testStatus = 1; 171 } 172 173 if (myPD->x->nY != NY_TERMS) { 174 printf("ERROR: myPD->x->nY is %d, should be %d\n", myPD->x->nY, NY_TERMS); 175 testStatus = 1; 176 } 177 if (myPD->y->nY != NY_TERMS) { 178 printf("ERROR: myPD->y->nY is %d, should be %d\n", myPD->y->nY, NY_TERMS); 179 testStatus = 1; 180 } 181 182 if (myPD->x->nZ != NZ_TERMS) { 183 printf("ERROR: myPD->x->nZ is %d, should be %d\n", myPD->x->nZ, NZ_TERMS); 184 testStatus = 1; 185 } 186 if (myPD->y->nZ != NZ_TERMS) { 187 printf("ERROR: myPD->y->nZ is %d, should be %d\n", myPD->y->nZ, NZ_TERMS); 188 testStatus = 1; 189 } 190 191 psFree(myPD); 113 192 return(testStatus); 114 193 }
Note:
See TracChangeset
for help on using the changeset viewer.
