Index: trunk/psLib/test/math/tap_psMatrix08.c
===================================================================
--- trunk/psLib/test/math/tap_psMatrix08.c	(revision 24020)
+++ trunk/psLib/test/math/tap_psMatrix08.c	(revision 24020)
@@ -0,0 +1,75 @@
+/** @file  tap_psMatrix_08.c
+*
+*  @brief Test driver for psMatrix transpose function
+*
+*  This test driver contains the following tests:
+*     Transpose input image into output image
+*     Transpose input image into auto allocated NULL output image
+*
+*  @author  Ross Harman, MHPCC
+*
+*  @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
+*
+*/
+#include <stdio.h>
+#include <string.h>
+#include <pslib.h>
+#include "tap.h"
+#include "pstap.h"
+
+# if (0)
+bool check_matrix(psImage *img)
+{
+    bool errorFlag = false;
+
+    for(psU32 i=0; i<img->numRows; i++) {
+        for(psU32 j=0; j<img->numCols; j++) {
+            if(img->type.type == PS_TYPE_F64) {
+                if(fabs(img->data.F64[i][j]-truthMatrix[i][j]) > TOLERANCE) {
+                    diag("Matrix values at element %d, %d don't agree %lf vs %lf\n", i, j,
+                         img->data.F64[i][j], truthMatrix[i][j]);
+                    errorFlag = true;
+                }
+            } else if(img->type.type == PS_TYPE_F32) {
+                if(fabs(img->data.F32[i][j]-truthMatrix[i][j]) > TOLERANCE) {
+                    diag("Matrix values at element %d, %d don't agree %f vs %lf\n", i, j,
+                         img->data.F32[i][j], truthMatrix[i][j]);
+                    errorFlag = true;
+                }
+            }
+        }
+    }
+    return(errorFlag);
+}
+# endif
+
+psS32 main( psS32 argc, char* argv[] )
+{
+    plan_tests(14);
+
+    // Transpose input image into output image
+    {
+        psMemId id = psMemGetId();
+
+	// we have a specific image which gave us trouble elsewhere:
+	psImage *inImage = psImageAlloc(2, 2, PS_TYPE_F64);
+	inImage->data.F64[0][0] = 0.0;
+	inImage->data.F64[0][1] = -0.000100588316855;
+	inImage->data.F64[1][0] = +0.000100588316855;
+	inImage->data.F64[1][1] = 4.4276353417e-11;
+
+	psVector *inVector = psVectorAlloc (2, PS_TYPE_F64);
+	inVector->data.F64[0] = 0.0;
+	inVector->data.F64[1] = 9.06388443347e-08;
+
+	bool status;
+	status = psMatrixGJSolveF32(inImage, inVector);
+        ok(status, "psMatrixGJSolve returns true exit status");
+        psFree(inImage);
+        psFree(inVector);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+}
