Changeset 1303
- Timestamp:
- Jul 27, 2004, 1:29:08 PM (22 years ago)
- Location:
- trunk/psLib/test/collections
- Files:
-
- 3 edited
-
tst_psVectorSort_03.c (modified) (3 diffs)
-
verified/tst_psVectorSort_03.stderr (modified) (1 diff)
-
verified/tst_psVectorSort_03.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/collections/tst_psVectorSort_03.c
r1300 r1303 6 6 * A) Create float vectors of different sizes 7 7 * B) Attempt to sort vectors...should get errors 8 * C) Free float vectors 8 * C) Create float vector and double vector 9 * D) Attempt to sort vectors...should get errors 10 * E) Free float, double vectors 9 11 * 10 12 * @author Ross Harman, MHPCC 11 13 * 12 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07-27 2 2:48:19$14 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-07-27 23:28:56 $ 14 16 * 15 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 25 27 psVector *in = NULL; 26 28 psVector *out = NULL; 27 29 psVector *in2 = NULL; 30 psVector *out2 = NULL; 28 31 29 32 // Test A - Create float vectors … … 46 49 printFooter(stdout, "psVectorSort", "Sort float vector", true); 47 50 51 // Test C - Create float vector and double vector 52 printPositiveTestHeader(stdout,"psVectorSort","Create float & double vectors of same size"); 53 in2 = psVectorAlloc(5, PS_TYPE_F32); 54 in2->n = 5; 55 out2 = psVectorAlloc(5, PS_TYPE_F64); 56 out2->n = 5; 57 for(int j=0; j<5; j++) { 58 printf("vec[%d] = %f\n", j, in2->data.F32[j]); 59 } 60 printFooter(stdout, "psVectorSort", "Create float and double vectors same size", true); 61 62 // Test D - Attempt to sort vectors with output of different type should create error 63 printNegativeTestHeader(stdout,"psVectorSort", "Sort F32/F64 vector", 64 "Input and output vector different types", 0); 65 out2 = psVectorSort(out2, in2); 66 printFooter(stdout, "psVectorSort", "Sort float vector", true); 48 67 49 68 // Test C - Free float vectors 50 69 printPositiveTestHeader(stdout,"psVectorSort", "Free float vectors"); 51 70 psFree(in); 71 psFree(in2); 52 72 psFree(out); 73 psFree(out2); 53 74 int nLeaks = psMemCheckLeaks(0, NULL, stdout); 54 75 if(nLeaks) { -
trunk/psLib/test/collections/verified/tst_psVectorSort_03.stderr
r1233 r1303 1 1 <DATE> <TIME> |<HOST>|E| psVectorSort| : Line 178 - Input and output vector sizes are not equal: in=5 out=6 2 <DATE> <TIME> |<HOST>|E| psVectorSort| : Line 184 - Input and output vectors are not same type: in=1028 out=1032 -
trunk/psLib/test/collections/verified/tst_psVectorSort_03.stdout
r1233 r1303 26 26 /***************************** TESTPOINT ******************************************\ 27 27 * TestFile: tst_psVectorSort_03.c * 28 * TestPoint: psVectorSort{Create float & double vectors of same size} * 29 * TestType: Positive * 30 \**********************************************************************************/ 31 32 vec[0] = 0.000000 33 vec[1] = 0.000000 34 vec[2] = 0.000000 35 vec[3] = 0.000000 36 vec[4] = 0.000000 37 38 ---> TESTPOINT PASSED (psVectorSort{Create float and double vectors same size} | tst_psVectorSort_03.c) 39 40 /***************************** TESTPOINT ******************************************\ 41 * TestFile: tst_psVectorSort_03.c * 42 * TestPoint: psVectorSort{Sort F32/F64 vector} * 43 * TestType: Negative * 44 * ExpectedErrorText: Input and output vector different types * 45 * ExpectedStatusValue: 0 * 46 \**********************************************************************************/ 47 48 49 ---> TESTPOINT PASSED (psVectorSort{Sort float vector} | tst_psVectorSort_03.c) 50 51 /***************************** TESTPOINT ******************************************\ 52 * TestFile: tst_psVectorSort_03.c * 28 53 * TestPoint: psVectorSort{Free float vectors} * 29 54 * TestType: Positive *
Note:
See TracChangeset
for help on using the changeset viewer.
