Index: trunk/psLib/test/math/tap_psMatrix01.c
===================================================================
--- trunk/psLib/test/math/tap_psMatrix01.c	(revision 10816)
+++ trunk/psLib/test/math/tap_psMatrix01.c	(revision 13124)
@@ -4,13 +4,11 @@
 *
 *  This test driver contains the following tests:
-*     Create input images
 *     Transpose input image into output image
 *     Transpose input image into auto allocated NULL output image
-*     Free input images
 *
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2006-12-20 20:02:29 $
+*  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2007-05-02 04:20:06 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -54,6 +52,29 @@
 psS32 main( psS32 argc, char* argv[] )
 {
-    plan_tests(10);
-    // Preliminary: Create input images
+    plan_tests(14);
+
+
+    // Verify with NULL input params
+    {
+        psMemId id = psMemGetId();
+        psImage *outImage = psMatrixTranspose(NULL, NULL);
+        ok(outImage == NULL, "psMatrixTranspose() returned NULL with NULL input params");
+        psFree(outImage);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Verify with incorrect input image type
+    {
+        psMemId id = psMemGetId();
+        psImage *inImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_S64);
+        psImage *outImage = psMatrixTranspose(NULL, inImage);
+        ok(outImage == NULL, "psMatrixTranspose() returned NULL with incorrect input image type");
+        psFree(inImage);
+        psFree(outImage);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
     psImage *inImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_F64);
     psImage *outImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_F64);
@@ -79,5 +100,5 @@
     inImageF32->data.F32[2][2] = 9;
 
-    // Test A - Transpose input image into output image
+    // Transpose input image into output image
     {
         psMemId id = psMemGetId();
@@ -99,13 +120,12 @@
     }
 
-    // Test B - Transpose input image into auto allocated NULL output image
+
+    // Transpose input image into auto allocated NULL output image
     {
         psMemId id = psMemGetId();
-        psImage *outImageNull = NULL;
-        outImageNull = psMatrixTranspose(outImageNull, inImage);
+        psImage *outImageNull = psMatrixTranspose(NULL, inImage);
         ok(!check_matrix(outImageNull), "Output image data set correctly");
 
-        psImage *outImageNullF32 = NULL;
-        outImageNullF32 = psMatrixTranspose(outImageNullF32, inImageF32);
+        psImage *outImageNullF32 = psMatrixTranspose(NULL, inImageF32);
         check_matrix(outImageNullF32);
         ok(!check_matrix(outImageNullF32), "Output image data set correctly");
