Changeset 2273 for trunk/psLib/test/collections/tst_psArray.c
- Timestamp:
- Nov 3, 2004, 3:05:00 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/collections/tst_psArray.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/collections/tst_psArray.c
r2204 r2273 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-1 0-27 00:57:33$14 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-11-04 01:05:00 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 43 43 psArray *psArr = psArrayAlloc(5); 44 44 if (psArr->nalloc != 5) { 45 psError( __func__,"psArray didn't have proper number of elements.");45 psError(PS_ERR_UNKNOWN, true,"psArray didn't have proper number of elements."); 46 46 return 1; 47 47 } … … 64 64 printf("ts[%d].x = %d ts[%d].y = %.2f\n", i, ts->x, i, ts->y); 65 65 if (fabsf(ts->x - 10*i) > 0.01f || fabsf(ts->y - 10.1*i) > 0.01f) { 66 psError( __func__,"Couldn't properly get elements from array.");66 psError(PS_ERR_UNKNOWN, true,"Couldn't properly get elements from array."); 67 67 return 2; 68 68 } … … 70 70 printf("array size = %d\n", psArr->nalloc); 71 71 if (psArr->nalloc != 5) { 72 psError( __func__,"Array Size wrong");72 psError(PS_ERR_UNKNOWN, true,"Array Size wrong"); 73 73 return 3; 74 74 } 75 75 printf("array population = %d\n", psArr->n); 76 76 if (psArr->n != 5) { 77 psError( __func__,"Array population wrong");77 psError(PS_ERR_UNKNOWN, true,"Array population wrong"); 78 78 return 4; 79 79 } … … 98 98 printf("ts[%d].x = %d ts[%d].y = %.2f\n", i, ts->x, i, ts->y); 99 99 if (fabsf(ts->x - 10*i) > 0.01f || fabsf(ts->y - 10.1*i) > 0.01f) { 100 psError( __func__,"Couldn't properly get elements from array.");100 psError(PS_ERR_UNKNOWN, true,"Couldn't properly get elements from array."); 101 101 return 5; 102 102 } … … 104 104 printf("array size = %d\n", psArr->nalloc); 105 105 if (psArr->nalloc != 10) { 106 psError( __func__,"Array Size wrong");106 psError(PS_ERR_UNKNOWN, true,"Array Size wrong"); 107 107 return 6; 108 108 } 109 109 printf("array population = %d\n", psArr->n); 110 110 if (psArr->n != 10) { 111 psError( __func__,"Array Population wrong");111 psError(PS_ERR_UNKNOWN, true,"Array Population wrong"); 112 112 return 7; 113 113 } … … 122 122 printf("ts[%d].x = %d ts[%d].y = %.2f\n", i, ts->x, i, ts->y); 123 123 if (fabsf(ts->x - 10*i) > 0.01f || fabsf(ts->y - 10.1*i) > 0.01f) { 124 psError( __func__,"Couldn't properly get elements from array.");124 psError(PS_ERR_UNKNOWN, true,"Couldn't properly get elements from array."); 125 125 return 8; 126 126 } … … 128 128 printf("array size = %d\n", psArr->nalloc); 129 129 if (psArr->nalloc != 3) { 130 psError( __func__,"Array Size wrong");130 psError(PS_ERR_UNKNOWN, true,"Array Size wrong"); 131 131 return 9; 132 132 } 133 133 printf("array population = %d\n", psArr->n); 134 134 if (psArr->n != 3) { 135 psError( __func__,"Array Population wrong");135 psError(PS_ERR_UNKNOWN, true,"Array Population wrong"); 136 136 return 10; 137 137 }
Note:
See TracChangeset
for help on using the changeset viewer.
