Index: /trunk/psLib/test/psTest.c
===================================================================
--- /trunk/psLib/test/psTest.c	(revision 957)
+++ /trunk/psLib/test/psTest.c	(revision 958)
@@ -48,5 +48,5 @@
         int currentId = psMemGetId();
         int retVal = fcn();
-        if (retVal == expectedReturn) {
+        if (retVal == 0) { // only bother checking memory if test executed to end.
             if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
                 psError(__func__,"Memory Leaks Detected");
@@ -57,5 +57,6 @@
         exit(retVal);
     } else if (child < 0) {
-        fprintf(fp,"Couldn't fork a process to run a negative test (%s|%s)", packageName, testPointName);
+        fprintf(fp,"Couldn't fork a process to run a negative test (%s|%s)",
+                packageName, testPointName);
         abort();
     }
@@ -64,14 +65,18 @@
 
     if (childReturn != expectedReturn) {
-        fprintf(fp,"Return value mismatch: expected %d, got %d",expectedReturn,childReturn);
+        fprintf(fp,"Return value mismatch: expected %d, got %d",
+                expectedReturn,childReturn);
     }
 
-    p_printFooter(fp,testPointFile,packageName,testPointName, (childReturn==expectedReturn));
+    p_printFooter(fp,testPointFile,packageName,testPointName,
+                  (childReturn==expectedReturn));
 
     return (childReturn==expectedReturn);
 }
 
-void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char*
-                               testPointName)
+void p_printPositiveTestHeader(FILE *fp,
+                               const char* testPointFile,
+                               const char* packageName,
+                               const char* testPointName)
 {
     char TP[80];
@@ -86,6 +91,10 @@
 }
 
-void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
-                               const char* testPointName,const char* expectedError, int exitValue)
+void p_printNegativeTestHeader(FILE *fp,
+                               const char* testPointFile,
+                               const char* packageName,
+                               const char* testPointName,
+                               const char* expectedError,
+                               int exitValue)
 {
     char TP[80];
@@ -103,5 +112,9 @@
 
 
-void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName,const char* testPointName, bool success)
+void p_printFooter(FILE *fp,
+                   const char* testPointFile,
+                   const char* packageName,
+                   const char* testPointName,
+                   bool success)
 {
     if (success) {
