Changeset 13124 for trunk/psLib/test/math/tap_psMatrix01.c
- Timestamp:
- May 1, 2007, 6:20:06 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/math/tap_psMatrix01.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/math/tap_psMatrix01.c
r10816 r13124 4 4 * 5 5 * This test driver contains the following tests: 6 * Create input images7 6 * Transpose input image into output image 8 7 * Transpose input image into auto allocated NULL output image 9 * Free input images10 8 * 11 9 * @author Ross Harman, MHPCC 12 10 * 13 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $14 * @date $Date: 200 6-12-20 20:02:29$11 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-05-02 04:20:06 $ 15 13 * 16 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 54 52 psS32 main( psS32 argc, char* argv[] ) 55 53 { 56 plan_tests(10); 57 // Preliminary: Create input images 54 plan_tests(14); 55 56 57 // Verify with NULL input params 58 { 59 psMemId id = psMemGetId(); 60 psImage *outImage = psMatrixTranspose(NULL, NULL); 61 ok(outImage == NULL, "psMatrixTranspose() returned NULL with NULL input params"); 62 psFree(outImage); 63 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 64 } 65 66 67 // Verify with incorrect input image type 68 { 69 psMemId id = psMemGetId(); 70 psImage *inImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_S64); 71 psImage *outImage = psMatrixTranspose(NULL, inImage); 72 ok(outImage == NULL, "psMatrixTranspose() returned NULL with incorrect input image type"); 73 psFree(inImage); 74 psFree(outImage); 75 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 76 } 77 78 58 79 psImage *inImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_F64); 59 80 psImage *outImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_F64); … … 79 100 inImageF32->data.F32[2][2] = 9; 80 101 81 // T est A - Transpose input image into output image102 // Transpose input image into output image 82 103 { 83 104 psMemId id = psMemGetId(); … … 99 120 } 100 121 101 // Test B - Transpose input image into auto allocated NULL output image 122 123 // Transpose input image into auto allocated NULL output image 102 124 { 103 125 psMemId id = psMemGetId(); 104 psImage *outImageNull = NULL; 105 outImageNull = psMatrixTranspose(outImageNull, inImage); 126 psImage *outImageNull = psMatrixTranspose(NULL, inImage); 106 127 ok(!check_matrix(outImageNull), "Output image data set correctly"); 107 128 108 psImage *outImageNullF32 = NULL; 109 outImageNullF32 = psMatrixTranspose(outImageNullF32, inImageF32); 129 psImage *outImageNullF32 = psMatrixTranspose(NULL, inImageF32); 110 130 check_matrix(outImageNullF32); 111 131 ok(!check_matrix(outImageNullF32), "Output image data set correctly");
Note:
See TracChangeset
for help on using the changeset viewer.
