Index: trunk/psLib/test/collections/tst_psArray.c
===================================================================
--- trunk/psLib/test/collections/tst_psArray.c	(revision 4296)
+++ trunk/psLib/test/collections/tst_psArray.c	(revision 4308)
@@ -17,6 +17,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.13 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2005-04-07 20:27:41 $
+ *  @version $Revision: 1.14 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2005-06-17 23:44:22 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -202,5 +202,5 @@
         }
     }
-    psFree(mySt[0]);
+    psMemDecrRefCounter(mySt[0]);
     printFooter(stderr,"psArray","Remove valid item", true);
 
@@ -235,13 +235,5 @@
         psFree(mySt[i]);
     }
-    if( psMemCheckLeaks(0, NULL, stderr, false) != 0) {
-        psError(PS_ERR_UNKNOWN,true,"Memory leaks detected.");
-        return 110;
-    }
-    psS32 nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        fprintf(stderr,"ERROR: Found %d bad memory blocks\n", nBad);
-        return 111;
-    }
+
     printFooter(stderr, "psArray" ,"Free void pointer array", true);
 
@@ -361,6 +353,4 @@
         }
 
-        psFree(data);
-
         subtest++;
         if (arr->nalloc != nalloc) {
@@ -386,4 +376,6 @@
             return subtest;
         }
+
+        psFree(data);
     }
 
@@ -391,5 +383,4 @@
     data = psAlloc(sizeof(float));
     arr = psArrayAdd(arr, delta, data);
-    psFree(data);
 
     // make sure the array was expanded
@@ -418,4 +409,6 @@
     }
 
+    psFree(data);
+
     // make the array full again (operation tested already)
     while (arr->n < arr->nalloc) {
Index: trunk/psLib/test/collections/tst_psMetadata_04.c
===================================================================
--- trunk/psLib/test/collections/tst_psMetadata_04.c	(revision 4296)
+++ trunk/psLib/test/collections/tst_psMetadata_04.c	(revision 4308)
@@ -23,6 +23,6 @@
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.18 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2005-04-07 20:27:41 $
+*  @version $Revision: 1.19 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2005-06-17 23:44:22 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -101,5 +101,5 @@
     psMetadataAddItem(metadata, item5, PS_LIST_HEAD, PS_META_DEFAULT);
     psMetadataAddItem(metadata, item6, PS_LIST_HEAD, PS_META_DEFAULT);
-    psFree(vec);
+    psMemDecrRefCounter(vec); // vs. psFree, which now would set vec to NULL (want to keep it to comparison later)
     printFooter(stdout, "psMetadata", "Test A - Allocate metadata items", true);
 
Index: trunk/psLib/test/dataManip/tst_psVectorFFT.c
===================================================================
--- trunk/psLib/test/dataManip/tst_psVectorFFT.c	(revision 4296)
+++ trunk/psLib/test/dataManip/tst_psVectorFFT.c	(revision 4308)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-05-11 22:02:16 $
+*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-17 23:44:22 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -474,5 +474,4 @@
 
     psFree( vec );
-    psFree( vec2 );
 
     // Perform conjugate for non-complex number
@@ -509,5 +508,5 @@
     for ( psU32 n = 0; n < 100; n++ ) {
         if ( fabsf( crealf(vec->data.C64[n]) - crealf(vec2->data.C64[n])) > FLT_EPSILON ||
-                fabsf( cimagf(vec->data.C64[n]) - cimagf(vec2->data.C64[n])) > FLT_EPSILON ) {
+                fabsf( cimagf(vec->data.C64[n]) + cimagf(vec2->data.C64[n])) > FLT_EPSILON ) {
             psError(PS_ERR_UNKNOWN,true,"psVectorConjugate result is invalid (n=%d)",n);
             return 13;
@@ -516,6 +515,6 @@
     psFree(vec);
 
-    // Perform vector conjugate with null input
-    if ( psVectorConjugate(NULL,NULL) != NULL) {
+    // Perform vector conjugate with null input (vec2 should be freed too)
+    if ( psVectorConjugate(vec2,NULL) != NULL) {
         psError(PS_ERR_UNKNOWN,true,"Did not return NULL with null input vector");
         return 61;
Index: trunk/psLib/test/image/tst_psImageGeomManip.c
===================================================================
--- trunk/psLib/test/image/tst_psImageGeomManip.c	(revision 4296)
+++ trunk/psLib/test/image/tst_psImageGeomManip.c	(revision 4308)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-11 02:19:05 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-17 23:44:22 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1077,6 +1077,68 @@
 static psS32 testImageTransform(void)
 {
-
-    /// XXX: TODO
+    int cols = 16;
+    int rows = 32;
+
+    psPlaneTransform* trans = psPlaneTransformAlloc(2,2);
+    trans->x->coeff[1][0] = 0.5;
+    trans->y->coeff[0][1] = 1.5;
+
+    psImage* in = psImageAlloc(cols,rows,PS_TYPE_F32);
+    for (psS32 row=0;row<rows;row++) {
+        psF32* inRow = in->data.F32[row];
+        for (psS32 col=0;col<cols;col++) {
+            inRow[col] = (psF32)row+(psF32)col/1000.0f;
+        }
+    }
+
+    psImage* out = psImageTransform(NULL,
+                                    NULL,
+                                    in,
+                                    NULL,
+                                    0,
+                                    trans,
+                                    psRegionSet(0,cols*2,0,rows*2),
+                                    NULL,
+                                    PS_INTERPOLATE_FLAT,
+                                    -1);
+
+    if (out == NULL) {
+        psError(PS_ERR_UNKNOWN, false,
+                "out == NULL");
+        return 1;
+    }
+    if (out->type.type != PS_TYPE_F32) {
+        psError(PS_ERR_UNKNOWN, false,
+                "out->type.type != PS_TYPE_F32, out->type.type == %d",
+                out->type.type);
+        return 2;
+    }
+    if (out->numRows != rows*2 || out->numCols != cols*2) {
+        psError(PS_ERR_UNKNOWN, false,
+                "out size is %dx%d, not %dx%d",
+                out->numCols, out->numRows, cols*2, rows);
+        return 3;
+    }
+
+    for (psS32 row=0;row<out->numRows;row++) {
+        psF32* outRow = out->data.F32[row];
+        for (psS32 col=0;col<cols;col++) {
+            float inValue = p_psImagePixelInterpolateFLAT_F32(in,
+                            col*trans->x->coeff[1][0]+trans->x->coeff[0][0],
+                            row*trans->y->coeff[0][1]+trans->y->coeff[0][0],
+                            NULL, 0,
+                            -1);
+            if (fabsf(outRow[col] - inValue) > FLT_EPSILON*10) {
+                psError(PS_ERR_UNKNOWN, false,
+                        "out at %d,%d was %g, expected %g",
+                        col,row,outRow[col], inValue);
+                return 4;
+            }
+        }
+    }
+
+    psFree(out);
+    psFree(in);
+    psFree(trans);
     return 0;
 }
Index: trunk/psLib/test/image/verified/tst_psImagePixelManip.stderr
===================================================================
--- trunk/psLib/test/image/verified/tst_psImagePixelManip.stderr	(revision 4296)
+++ trunk/psLib/test/image/verified/tst_psImagePixelManip.stderr	(revision 4308)
@@ -27,6 +27,4 @@
 <DATE><TIME>|<HOST>|I|testImageClip
     Following should be an error (max<min)
-<DATE><TIME>|<HOST>|E|psImageClip (FILE:LINENO)
-    Specified min value, 256, can not be greater than the specified max value, 128.
 
 ---> TESTPOINT PASSED (psImage{psImageClip} | tst_psImagePixelManip.c)
Index: trunk/psLib/test/sysUtils/tst_psMemory.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 4296)
+++ trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 4308)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-04-07 20:27:42 $
+*  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-17 23:44:22 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -130,5 +130,5 @@
     psLogMsg( __func__, PS_LOG_INFO, "psFree shall be just decrement a multiple refererenced pointer." );
 
-    psFree( mem );
+    psMemDecrRefCounter( mem );
 
     ref = psMemGetRefCounter( mem );
@@ -521,10 +521,11 @@
 {
 
-    psPtr  buffer = psAlloc( 1024 );
+    psPtr buffer = psAlloc( 1024 );
+    psPtr buffer2 = buffer;
 
     psFree( buffer );
 
     psLogMsg( __func__, PS_LOG_INFO, "Next should abort due to multiple freeing." );
-    psFree( buffer );
+    psFree( buffer2 );
 
     psError(PS_ERR_UNKNOWN,true,
