Index: /trunk/psLib/test/sysUtils/tst_psMemory.c
===================================================================
--- /trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 539)
+++ /trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 540)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-04-28 02:29:13 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-04-28 02:50:56 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,8 +19,11 @@
 #include "psTest.h"
 #include "psMemory.h"
+#include "psAbort.h"
 
-int TPFreeReferencedMemory(void);
+static int TPFreeReferencedMemory(void);
+static int TPCheckBufferPositive(void);
 
 testDescription tests[] = {
+                              {TPCheckBufferPositive,"TPCheckBufferPositive",0},
                               {TPFreeReferencedMemory,"TPFreeReferencedMemory",6},
                               {NULL}
@@ -32,4 +35,26 @@
 }
 
+int TPCheckBufferPositive(void)
+{
+    int* mem;
+    const int size = 100;
+    int failed = 0;
+
+    printf("Allocating buffer\n");
+    mem = (int*) psAlloc(size*sizeof(int));
+
+    for (int index=0;index<size;index++) {
+        mem[index]=index;
+    }
+
+    for (int index=0;index<size;index++) {
+        if (mem[index] != index) {
+            failed++;
+        }
+    }
+
+    return failed;
+}
+
 int TPFreeReferencedMemory(void)
 {
@@ -37,12 +62,10 @@
     int* mem;
 
-    printf("Allocating buffer\n");
+    printf("Allocating buffer.\n");
     mem = (int*) psAlloc(100*sizeof(int));
 
     psMemIncrRefCounter(mem);
-    printf("Freeing first time\n");
+    printf("Freeing buffer after incrementing reference count.\n");
     psFree(mem);
-
-    printf("I survived?\n");
 
     return 0;
