Index: /trunk/psLib/test/collections/tst_psSort_01.c
===================================================================
--- /trunk/psLib/test/collections/tst_psSort_01.c	(revision 987)
+++ /trunk/psLib/test/collections/tst_psSort_01.c	(revision 988)
@@ -10,6 +10,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-06-02 23:29:29 $
+ *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-06-10 23:14:22 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -25,12 +25,13 @@
     psVector *in = NULL;
     psVector *out = NULL;
+    psVector *tempVec = NULL;
 
 
     // Test A - Create float vectors
     printPositiveTestHeader(stdout,"psSort", "Create float vectors");
-    in = psVectorAlloc(5, PS_TYPE_F32);
-    in->n = 5;
-    out = psVectorAlloc(5, PS_TYPE_F32);
-    out->n = 5;
+    in = psVectorAlloc(7, PS_TYPE_F32);
+    in->n = 7;
+    out = psVectorAlloc(7, PS_TYPE_F32);
+    out->n = 7;
     in->data.F32[0] = 7.0f;
     in->data.F32[1] = 9.0f;
@@ -38,5 +39,7 @@
     in->data.F32[3] = 1.0f;
     in->data.F32[4] = 5.0f;
-    for(int i=0; i<5; i++) {
+    in->data.F32[5] = 5.0f;
+    in->data.F32[6] = -20.0f;
+    for(int i=0; i<7; i++) {
         printf("vec[%d] = %f\n", i, in->data.F32[i]);
     }
@@ -46,12 +49,25 @@
     // Test B - Sort input float vector and put results into output float vector
     printPositiveTestHeader(stdout,"psSort", "Sort float vector");
+    tempVec = out;
     out = psSort(out, in);
-    for(int i=0; i<5; i++) {
+    for(int i=0; i<7; i++) {
         printf("vec[%d] = %f\n", i, out->data.F32[i]);
+    }
+    if(out != tempVec) {
+        printf("Error: Return pointer not equal to output argument pointer\n");
     }
     printFooter(stdout, "psSort", "Sort float vector", true);
 
 
-    // Test C - Free float vectors
+    // Test C - Sort input float vector into itself
+    printPositiveTestHeader(stdout,"psSort", "Sort input float vector into itself");
+    in = psSort(in, in);
+    for(int i=0; i<7; i++) {
+        printf("vec[%d] = %f\n", i, out->data.F32[i]);
+    }
+    printFooter(stdout, "psSort", "Sort input float vector into itself", true);
+
+
+    // Test D - Free float vectors
     printPositiveTestHeader(stdout,"psSort", "Free float vectors");
     psVectorFree(in);
Index: /trunk/psLib/test/collections/tst_psSort_04.c
===================================================================
--- /trunk/psLib/test/collections/tst_psSort_04.c	(revision 987)
+++ /trunk/psLib/test/collections/tst_psSort_04.c	(revision 988)
@@ -5,11 +5,10 @@
  *  This test driver contains the following tests for psSort test point 4:
  *     A)  Attempt to sort with null input vector
- *     B)  Attempt to sort with null output vector 
- *     C)  Free vectors 
+ *     B)  Free vectors
  *
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-06-02 23:29:29 $
+ *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-06-10 23:14:22 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,6 +23,4 @@
 {
     psVector *badIn = NULL;
-    psVector *badOut = NULL;
-    psVector *goodIn = psVectorAlloc(5, PS_TYPE_F32);
     psVector *goodOut = psVectorAlloc(5, PS_TYPE_F32);
 
@@ -34,13 +31,6 @@
     printFooter(stdout, "psSort", "Attempt to sort with null input vector", true);
 
-    // Test B - Attempt to sort with null output vector
-    printNegativeTestHeader(stdout,"psSort", "Attempt to sort with null output vector",
-                            "Null output vector", 0);
-    badOut = psSort(badOut, goodIn);
-    printFooter(stdout, "psSort", "Attempt to sort with null output vector", true);
-
-    // Test C - Free vectors
+    // Test B - Free vectors
     printPositiveTestHeader(stdout, "psSort", "Free vectors");
-    psVectorFree(goodIn);
     psVectorFree(goodOut);
     psMemCheckLeaks(0, NULL, stdout);
Index: /trunk/psLib/test/collections/verified/tst_psSort_01.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psSort_01.stdout	(revision 987)
+++ /trunk/psLib/test/collections/verified/tst_psSort_01.stdout	(revision 988)
@@ -10,4 +10,6 @@
 vec[3] = 1.000000
 vec[4] = 5.000000
+vec[5] = 5.000000
+vec[6] = -20.000000
 
 ---> TESTPOINT PASSED (psSort{Create float vectors} | tst_psSort_01.c)
@@ -19,11 +21,29 @@
 \----------------------------------------------------------------------------------/
 
-vec[0] = 1.000000
-vec[1] = 3.000000
-vec[2] = 5.000000
-vec[3] = 7.000000
-vec[4] = 9.000000
+vec[0] = -20.000000
+vec[1] = 1.000000
+vec[2] = 3.000000
+vec[3] = 5.000000
+vec[4] = 5.000000
+vec[5] = 7.000000
+vec[6] = 9.000000
 
 ---> TESTPOINT PASSED (psSort{Sort float vector} | tst_psSort_01.c)
+
+/----------------------------- TESTPOINT ------------------------------------------\
+|             TestFile: tst_psSort_01.c                                            |
+|            TestPoint: psSort{Sort input float vector into itself}                |
+|             TestType: Positive                                                   |
+\----------------------------------------------------------------------------------/
+
+vec[0] = -20.000000
+vec[1] = 1.000000
+vec[2] = 3.000000
+vec[3] = 5.000000
+vec[4] = 5.000000
+vec[5] = 7.000000
+vec[6] = 9.000000
+
+---> TESTPOINT PASSED (psSort{Sort input float vector into itself} | tst_psSort_01.c)
 
 /----------------------------- TESTPOINT ------------------------------------------\
Index: /trunk/psLib/test/collections/verified/tst_psSort_04.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psSort_04.stderr	(revision 987)
+++ /trunk/psLib/test/collections/verified/tst_psSort_04.stderr	(revision 988)
@@ -1,2 +1,1 @@
- <DATE> <TIME> <HOST> |E|psSort         | : Line 124 - Null input vector
- <DATE> <TIME> <HOST> |E|psSort         | : Line 119 - Null output vector
+ <DATE> <TIME> <HOST> |E|psSort         | : Line 118 - Null input vector
Index: /trunk/psLib/test/collections/verified/tst_psSort_04.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psSort_04.stdout	(revision 987)
+++ /trunk/psLib/test/collections/verified/tst_psSort_04.stdout	(revision 988)
@@ -12,15 +12,4 @@
 /----------------------------- TESTPOINT ------------------------------------------\
 |             TestFile: tst_psSort_04.c                                            |
-|            TestPoint: psSort{Attempt to sort with null output vector}            |
-|             TestType: Negative                                                   |
-|    ExpectedErrorText: Null output vector                                         |
-|  ExpectedStatusValue: 0                                                          |
-\----------------------------------------------------------------------------------/
-
-
----> TESTPOINT PASSED (psSort{Attempt to sort with null output vector} | tst_psSort_04.c)
-
-/----------------------------- TESTPOINT ------------------------------------------\
-|             TestFile: tst_psSort_04.c                                            |
 |            TestPoint: psSort{Free vectors}                                       |
 |             TestType: Positive                                                   |
