Index: unk/psLib/test/mathtypes/tap_psVectorSort_01.c
===================================================================
--- /trunk/psLib/test/mathtypes/tap_psVectorSort_01.c	(revision 12918)
+++ 	(revision )
@@ -1,151 +1,0 @@
-/** @file  tst_psVectorSort_01.c
- *
- *  @brief Test driver for psVectorSort functions
- *
- *  This test driver contains the following tests for psVectorSort test point 1:
- *     A)  Sort input vector to output vector for all types
- *     B)  Sort input float vector into itself
- *     C)  Attempt to sort vector with invalid type (i.e. PS_TYPE_BOOL)
- *     D)  Sort input vector with zero items
- *     C)  Free float vectors
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2007-04-10 21:09:31 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-#include <pslib.h>
-#include "tap.h"
-#include "pstap.h"
-
-#define tstVectorSortByType(datatype,value)   \
-in = psVectorAlloc(7,PS_TYPE_##datatype); \
-out = psVectorAlloc(7,PS_TYPE_##datatype); \
-in->data.datatype[0] = 7+value; \
-in->data.datatype[1] = 9+value; \
-in->data.datatype[2] = 3+value; \
-in->data.datatype[3] = 1+value; \
-in->data.datatype[4] = 5+value; \
-in->data.datatype[5] = 5+value; \
-in->data.datatype[6] = 0+value; \
-tempVec = out; \
-out = psVectorSort(out, in); \
-ok(tempVec == out, \
-   "Return value equal to orignal output argument passed to function"); \
-skip_start(tempVec != out, \
-           7,"Return value not equal to orignal output argument passed to function"); \
-ok(out->data.datatype[0] == in->data.datatype[6], \
-   "sort out[0] type %s",#datatype); \
-ok(out->data.datatype[1] == in->data.datatype[3], \
-   "sort out[1] type %s",#datatype); \
-ok(out->data.datatype[2] == in->data.datatype[2], \
-   "sort out[2] type %s",#datatype); \
-ok(out->data.datatype[3] == in->data.datatype[4], \
-   "sort out[3] type %s",#datatype); \
-ok(out->data.datatype[4] == in->data.datatype[5], \
-   "sort out[4] %s",#datatype); \
-ok(out->data.datatype[5] == in->data.datatype[0], \
-   "sort out[5] %s",#datatype); \
-ok(out->data.datatype[6] == in->data.datatype[1], \
-   "sort out[6] %s",#datatype); \
-skip_end(); \
-psFree(in); \
-psFree(out);
-
-
-
-psS32 main(psS32 argc,
-           char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel(PS_LOG_INFO);
-    plan_tests(97);
-
-    psVector *in = NULL;
-    psVector *out = NULL;
-    psVector *tempVec = NULL;
-
-    // Test A - Verify the sort for all supported types
-    {
-        psMemId id = psMemGetId();
-        tstVectorSortByType(S8,0);
-        tstVectorSortByType(S16,1);
-        tstVectorSortByType(S32,2);
-        tstVectorSortByType(S64,3);
-        tstVectorSortByType(U8,4);
-        tstVectorSortByType(U16,5);
-        tstVectorSortByType(U32,6);
-        tstVectorSortByType(U64,7);
-        tstVectorSortByType(F32,8);
-        tstVectorSortByType(F64,9);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test B - Sort input vector into itself
-    {
-        psMemId id = psMemGetId();
-        psVector *in = psVectorAlloc(7, PS_TYPE_F32);
-        in->data.F32[0] = 0.7f;
-        in->data.F32[1] = 0.9f;
-        in->data.F32[2] = 0.3f;
-        in->data.F32[3] = 0.1f;
-        in->data.F32[4] = 0.5f;
-        in->data.F32[5] = 0.5f;
-        in->data.F32[6] = -2.0f;
-        in = psVectorSort(in, in);
-        ok(in->data.F32[0] == -2.0f,"self sort in[0]");
-        ok(in->data.F32[1] == 0.1f,"self sort in[1]");
-        ok(in->data.F32[2] == 0.3f, "self sort in[2]");
-        ok(in->data.F32[3] == 0.5f, "self sort in[3]");
-        ok(in->data.F32[4] == 0.5f, "self sort in[4]");
-        ok(in->data.F32[5] == 0.7f, "self sort in[5]");
-        ok(in->data.F32[6] == 0.9f, "self sort in[6]");
-        psFree(in);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test C - Attempt to sort vector with invalid type
-    {
-        psMemId id = psMemGetId();
-        psVector *in = psVectorAlloc(7, PS_TYPE_F32);
-        in->type.type = PS_TYPE_BOOL;
-        out = psVectorAlloc(7,PS_TYPE_F32);
-        tempVec = psVectorSort(out,in);
-        ok(tempVec == NULL, "Did return NULL on error");
-        psFree(out);
-        psFree(in);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test D - Sort vector with zero elements
-    {
-        psMemId id = psMemGetId();
-        out = psVectorAlloc(7,PS_TYPE_F32);
-        in->n = 0;
-        out = psVectorSort(out,in);
-        ok(out != NULL, "psVectorSort returned a non-NULL vector" );
-        skip_start (out == NULL, 1, "psVectorSort returned a NULL vector" );
-        ok(out->n == 0, "psVectorSort correctly return a 0-length vector");
-        skip_end();
-        psFree(out);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test D - Free float vectors
-    {
-        psMemId id = psMemGetId();
-        psVector *in = psVectorAlloc(7, PS_TYPE_F32);
-        psFree(in);
-        ok( ! psMemCheckLeaks(0, NULL, stdout, false),"Memory leaks not detected");
-        psS32 nBad = psMemCheckCorruption(stderr, false);
-        ok(!nBad, "Found %d bad memory blocks", nBad);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-}
Index: unk/psLib/test/mathtypes/tap_psVectorSort_02.c
===================================================================
--- /trunk/psLib/test/mathtypes/tap_psVectorSort_02.c	(revision 12918)
+++ 	(revision )
@@ -1,162 +1,0 @@
-/** @file  tst_psVectorSort_02.c
- *
- *  @brief Test driver for psVectorSort functions
- *
- *  This test driver contains the following tests for psVectorSort test point 2:
- *     A)  Create vectors
- *     B)  Sort integer vector of indices based on pre-sort order of floating point vector
- *     C)  Attempt to sort with null input vector
- *     D)  Sort with output vector which needs to be resized
- *     E)  Sort input vector with zero elements
- *     F)  Attempt to sort input vector with invalid type
- *     G)  Free vectors
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2007-04-10 21:09:31 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include <pslib.h>
-
-#include "tap.h"
-#include "pstap.h"
-
-#define tstVectorSortIndexByType(datatype,value) \
-in = psVectorAlloc( 5, PS_TYPE_##datatype ); \
-in->data.datatype[0] = 7+value; \
-in->data.datatype[1] = 9+value; \
-in->data.datatype[2] = 5+value; \
-in->data.datatype[3] = 1+value; \
-in->data.datatype[4] = 5+value; \
-out = psVectorSortIndex(out,in); \
-ok(out->type.type == PS_TYPE_S32, \
-   "Output vector is of type PS_TYPE_S32"); \
-ok(out->data.U32[0] == 3,  \
-   "index sort out[0] = %ld",out->data.U32[0]); \
-ok(out->data.U32[1] == 2, \
-   "index sort out[1] = %ld",out->data.U32[1]); \
-ok(out->data.U32[2] == 4, \
-   "index sort out[2] = %ld",out->data.U32[2]); \
-ok(out->data.U32[3] == 0, \
-   "index sort out[3] = %ld",out->data.U32[3]); \
-ok(out->data.U32[4] == 1, \
-   "index sort out[4] = %ld",out->data.U32[4]); \
-psFree(in);
-
-
-psS32 main(psS32 argc, char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel(PS_LOG_INFO);
-    plan_tests(77);
-
-    psVector *in = NULL;
-    psVector *out = NULL;
-    psVector *tempVect = NULL;
-
-    // Test A - Sort vectors by index for all types
-    {
-        psMemId id = psMemGetId();
-        tstVectorSortIndexByType(S8,0)
-        tstVectorSortIndexByType(U8,1)
-        tstVectorSortIndexByType(S16,2)
-        tstVectorSortIndexByType(U16,3)
-        tstVectorSortIndexByType(S32,4)
-        tstVectorSortIndexByType(U32,5)
-        tstVectorSortIndexByType(S64,6)
-        tstVectorSortIndexByType(U64,7)
-        tstVectorSortIndexByType(F32,8)
-        tstVectorSortIndexByType(F64,9)
-        psFree(out);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test  C  Attempt to sort with null input vector
-    {
-        psMemId id = psMemGetId();
-        in = NULL;
-        out = psVectorAlloc(5,PS_TYPE_U32);
-        out = psVectorSortIndex(out,in);
-        ok(out == NULL, "Did return NULL with NULL input specified");
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test  D  Sort with output vector which needs to be resized
-    {
-        psMemId id = psMemGetId();
-        in = psVectorAlloc(5,PS_TYPE_U8);
-        in->n=5;
-        for(psS32 m=0; m<5; m++) {
-            in->data.U8[m]= 20-m;
-        }
-        out = psVectorAlloc(5,PS_TYPE_U32);
-        out->n = 5;
-        out = psVectorSortIndex(out,in);
-        ok(out->n == 5, "Did properly resize output vector...out->n=%d, in->n=%d", out->n, in->n);
-        ok(out->data.U32[0] == 4,
-           "Did properly sort index out[0] = %d",out->data.U32[0]);
-        ok(out->data.U32[1] == 3,
-           "Did properly sort index out[1] = %d",out->data.U32[1]);
-        ok(out->data.U32[2] == 2,
-           "Did properly sort index out[2] = %d",out->data.U32[2]);
-        ok(out->data.U32[3] == 1,
-           "Did properly sort index out[3] = %d",out->data.U32[3]);
-        ok(out->data.U32[4] == 0,
-           "Did properly sort index out[4] = %d",out->data.U32[4]);
-        psFree(in);
-        psFree(out);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test E - Sort input vector with zero elements
-    {
-        psMemId id = psMemGetId();
-        in = psVectorAlloc(5,PS_TYPE_U8);
-        out = psVectorAlloc(5,PS_TYPE_U32);
-        in->n = 0;
-        out->n = 0;
-        tempVect = out;
-        out = psVectorSortIndex(out,in);
-        ok ( out == tempVect, "Did not return the same output vector");
-        in->n=5;
-        out->n=5;
-        psFree(out);
-        psFree(in);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test F - Attempt to sort input vector with invalid type
-    {
-        psMemId id = psMemGetId();
-        in = psVectorAlloc(5,PS_TYPE_U8);
-        out = psVectorAlloc(5,PS_TYPE_U32);
-        in->n = 5;
-        out->n = 5;
-        tempVect = out;
-        in->type.type = PS_TYPE_BOOL;
-        out = psVectorSortIndex(out,in);
-        ok( out == NULL, "Did return NULL");
-        in->type.type = PS_TYPE_U8;
-        psFree(in);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Test G - Free vectors
-    {
-        psMemId id = psMemGetId();
-        psS32 nLeaks = psMemCheckLeaks(0, NULL, stdout, false);
-        ok(!nLeaks, "Found %d memory leaks", nLeaks);
-        psS32 nBad = psMemCheckCorruption(stderr, false);
-        ok(!nBad, "Found %d bad memory blocks", nBad);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-}
Index: unk/psLib/test/mathtypes/tap_psVectorSort_03.c
===================================================================
--- /trunk/psLib/test/mathtypes/tap_psVectorSort_03.c	(revision 12918)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/** @file  tst_psVectorSort_03.c
- *
- *  @brief Test driver for psVectorSort functions
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2007-04-10 21:09:31 $
- *
- *  XXX: These tests are obsolete.  psVectorSOrt no longer returns error
- *  with incorrect input vector types or sizes
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include <pslib.h>
-
-#include "tap.h"
-#include "pstap.h"
-
-
-psS32 main(psS32 argc,
-           char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel(PS_LOG_INFO);
-    plan_tests(1);
-    ok(true, "cake");
-
-    // Create float vectors with incorrect sizes
-    if (0) {
-        psMemId id = psMemGetId();
-        psVector *in = psVectorAlloc(5, PS_TYPE_F32);
-        psVector *out = psVectorAlloc(6, PS_TYPE_F32);
-        psVector *out2 = psVectorSort(out, in);
-        ok(out2 == NULL, "psVectorSort() returned() NULL with non-uniform verctor input sizes");
-        psFree(in);
-        psFree(out);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-    // Create float vector and double vector
-    if (0) {
-        psMemId id = psMemGetId();
-        psVector *in2 = psVectorAlloc(5, PS_TYPE_F32);
-        psVector *out2 = psVectorAlloc(5, PS_TYPE_F64);
-        psVector *out3 = psVectorSort(out2, in2);
-        ok(out3 == NULL, "psVectorSort() returned() NULL with non-uniform verctor input types");
-        psFree(in2);
-        psFree(out2);
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-}
Index: unk/psLib/test/mathtypes/tap_psVectorSort_04.c
===================================================================
--- /trunk/psLib/test/mathtypes/tap_psVectorSort_04.c	(revision 12918)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/** @file  tst_psVectorSort_04.c
- *
- *  @brief Test driver for psVectorSort functions
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2007-04-10 21:09:31 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-#include <pslib.h>
-#include "tap.h"
-#include "pstap.h"
-
-
-psS32 main(psS32 argc,
-           char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel(PS_LOG_INFO);
-    plan_tests(2);
-
-
-    // Attempt to sort with null input vector
-    {
-        psMemId id = psMemGetId();
-        psVector *goodOut = psVectorAlloc(5, PS_TYPE_F32);
-        goodOut = psVectorSort(goodOut, NULL);
-        ok(goodOut == NULL, "psVectorSort() returned NULL with NULL input vector");
-        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
-    }
-}
Index: unk/psLib/test/mathtypes/tst_psVectorSort_01.c
===================================================================
--- /trunk/psLib/test/mathtypes/tst_psVectorSort_01.c	(revision 12918)
+++ 	(revision )
@@ -1,200 +1,0 @@
-/** @file  tst_psVectorSort_01.c
- *
- *  @brief Test driver for psVectorSort functions
- *
- *  This test driver contains the following tests for psVectorSort test point 1:
- *     A)  Sort input vector to output vector for all types
- *     B)  Sort input float vector into itself
- *     C)  Attempt to sort vector with invalid type (i.e. PS_TYPE_BOOL)
- *     D)  Sort input vector with zero items
- *     C)  Free float vectors
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2006-05-05 02:48:35 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-#define tstVectorSortByType(datatype,value)   \
-in = psVectorAlloc(7,PS_TYPE_##datatype); \
-in->n = 7;  \
-out = psVectorAlloc(7,PS_TYPE_##datatype); \
-out->n = 7;  \
-in->data.datatype[0] = 7+value; \
-in->data.datatype[1] = 9+value; \
-in->data.datatype[2] = 3+value; \
-in->data.datatype[3] = 1+value; \
-in->data.datatype[4] = 5+value; \
-in->data.datatype[5] = 5+value; \
-in->data.datatype[6] = 0+value; \
-tempVec = out; \
-out = psVectorSort(out, in); \
-if(tempVec != out) {  \
-    psError(PS_ERR_UNKNOWN,true,"Return value not equal to orignal output argument passed to function"); \
-    return 5; \
-} \
-if(out->data.datatype[0] != in->data.datatype[6]) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper sort out[0] type %s",#datatype); \
-    return 10; \
-} \
-if(out->data.datatype[1] != in->data.datatype[3]) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper sort out[1] type %s",#datatype); \
-    return 20; \
-} \
-if(out->data.datatype[2] != in->data.datatype[2]) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper sort out[2] type %s",#datatype); \
-    return 30; \
-} \
-if(out->data.datatype[3] != in->data.datatype[4]) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper sort out[3] type %s",#datatype); \
-    return 40; \
-} \
-if(out->data.datatype[4] != in->data.datatype[5]) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper sort out[4] %s",#datatype); \
-    return 50; \
-} \
-if(out->data.datatype[5] != in->data.datatype[0]) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper sort out[5] %s",#datatype); \
-    return 60; \
-} \
-if(out->data.datatype[6] != in->data.datatype[1]) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper sort out[6] %s",#datatype); \
-    return 70; \
-} \
-psFree(in); \
-psFree(out);
-
-
-
-psS32 main(psS32 argc,
-           char* argv[])
-{
-    psVector *in = NULL;
-    psVector *out = NULL;
-    psVector *tempVec = NULL;
-
-    // Test A - Verify the sort for all supported types
-    printPositiveTestHeader(stdout,"psVectorSort","Sort all types");
-    tstVectorSortByType(S8,0);
-    tstVectorSortByType(S16,1);
-    tstVectorSortByType(S32,2);
-    tstVectorSortByType(S64,3);
-    tstVectorSortByType(U8,4);
-    tstVectorSortByType(U16,5);
-    tstVectorSortByType(U32,6);
-    tstVectorSortByType(U64,7);
-    tstVectorSortByType(F32,8);
-    tstVectorSortByType(F64,9);
-    printFooter(stdout,"psVectorSort","Sort all types",true);
-
-    // Test B - Sort input vector into itself
-    printPositiveTestHeader(stdout,"psVectorSort", "Sort input float vector into itself");
-    in = psVectorAlloc(7, PS_TYPE_F32);
-    in->n = 7;
-    in->data.F32[0] = 0.7f;
-    in->data.F32[1] = 0.9f;
-    in->data.F32[2] = 0.3f;
-    in->data.F32[3] = 0.1f;
-    in->data.F32[4] = 0.5f;
-    in->data.F32[5] = 0.5f;
-    in->data.F32[6] = -2.0f;
-    in = psVectorSort(in, in);
-    if(in->data.F32[0] != -2.0f) {
-        psError(PS_ERR_UNKNOWN,true,"Improper self sort in[0]");
-        return 100;
-    }
-    if(in->data.F32[1] != 0.1f) {
-        psError(PS_ERR_UNKNOWN,true,"Improper self sort in[1]");
-        return 200;
-    }
-    if(in->data.F32[2] != 0.3f) {
-        psError(PS_ERR_UNKNOWN,true,"Improper self sort in[2]");
-        return 300;
-    }
-    if(in->data.F32[3] != 0.5f) {
-        psError(PS_ERR_UNKNOWN,true,"Improper self sort in[3]");
-        return 400;
-    }
-    if(in->data.F32[4] != 0.5f) {
-        psError(PS_ERR_UNKNOWN,true,"Improper self sort in[4]");
-        return 500;
-    }
-    if(in->data.F32[5] != 0.7f) {
-        psError(PS_ERR_UNKNOWN,true,"Improper self sort in[5]");
-        return 600;
-    }
-    if(in->data.F32[6] != 0.9f) {
-        psError(PS_ERR_UNKNOWN,true,"Improper self sort in[6]");
-        return 700;
-    }
-    printFooter(stdout, "psVectorSort", "Sort input float vector into itself", true);
-
-    // Test C - Attempt to sort vector with invalid type
-    printPositiveTestHeader(stdout,"psVectorSort","Invalid vector type");
-    in->type.type = PS_TYPE_BOOL;
-    out = psVectorAlloc(7,PS_TYPE_F32);
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error messgae");
-    //    printf("\nBefore call, tempVec = psVectorSort(out,in) \n");
-    tempVec = psVectorSort(out,in);
-    //    printf("\nAfter call, tempVec = psVectorSort(out,in) \n");
-    if(tempVec != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Did not return NULL on error or didn't error?");
-        return 33;
-    }
-    printFooter(stdout,"psVectorSort","Invalid vector type",true);
-
-    // Test D - Sort vector with zero elements
-    printPositiveTestHeader(stdout,"psVectorSort","Sort zero element vector");
-    //    psFree(out);
-    //    psFree(tempVec);
-    //    out = NULL;
-    //    tempVec = NULL;
-    out = psVectorAlloc(7,PS_TYPE_F32);
-    //    tempVec = out;
-    in->n = 0;
-    out = psVectorSort(out,in);
-    //    if(tempVec != out) {
-    //        psError(PS_ERR_UNKNOWN,true,"Did not return the specified output vector");
-    //        return 44;
-    //    }
-    if (out != NULL) {
-        if (out->n != 0) {
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                    "psVectorSort failed to correctly return a 0-length vector.\n");
-            return 12;
-        }
-    } else {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                "psVectorSort returned a NULL vector instead of expected vector with n=0.\n");
-        return 13;
-    }
-    /*    if(out->n != 0) {
-            psError(PS_ERR_UNKNOWN,true,"Did not properly set the number of elements to zero");
-            return 55;
-        }
-        */
-    psFree(out);
-    printFooter(stdout,"psVectorSort","Sort zero element vector",true);
-
-
-    // Test D - Free float vectors
-    printPositiveTestHeader(stdout,"psVectorSort", "Free float vectors");
-    psFree(in);
-    if ( psMemCheckLeaks(0, NULL, stdout, false)) {
-        psError(PS_ERR_UNKNOWN,true,"Memory leaks detected.");
-        return 10;
-    }
-    psS32 nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psVectorSort", "Free float vectors", true);
-
-    return 0;
-}
Index: unk/psLib/test/mathtypes/tst_psVectorSort_02.c
===================================================================
--- /trunk/psLib/test/mathtypes/tst_psVectorSort_02.c	(revision 12918)
+++ 	(revision )
@@ -1,178 +1,0 @@
-/** @file  tst_psVectorSort_02.c
- *
- *  @brief Test driver for psVectorSort functions
- *
- *  This test driver contains the following tests for psVectorSort test point 2:
- *     A)  Create vectors
- *     B)  Sort integer vector of indices based on pre-sort order of floating point vector
- *     C)  Attempt to sort with null input vector
- *     D)  Sort with output vector which needs to be resized
- *     E)  Sort input vector with zero elements
- *     F)  Attempt to sort input vector with invalid type
- *     G)  Free vectors
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2006-05-03 00:27:51 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-#define tstVectorSortIndexByType(datatype,value) \
-in = psVectorAlloc( 5, PS_TYPE_##datatype ); \
-in->n = 5; \
-in->data.datatype[0] = 7+value; \
-in->data.datatype[1] = 9+value; \
-in->data.datatype[2] = 5+value; \
-in->data.datatype[3] = 1+value; \
-in->data.datatype[4] = 5+value; \
-out = psVectorSortIndex(out,in); \
-if(out->type.type != PS_TYPE_S32) { \
-    psError(PS_ERR_UNKNOWN,true,"Output vector is not of type PS_TYPE_U32"); \
-    return 1; \
-} \
-if(out->data.U32[0] != 3 ) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper index sort out[0] = %ld",out->data.U32[0]); \
-} \
-if(out->data.U32[1] != 2 ) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper index sort out[1] = %ld",out->data.U32[1]); \
-} \
-if(out->data.U32[2] != 4 ) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper index sort out[2] = %ld",out->data.U32[2]); \
-} \
-if(out->data.U32[3] != 0 ) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper index sort out[3] = %ld",out->data.U32[3]); \
-} \
-if(out->data.U32[4] != 1 ) { \
-    psError(PS_ERR_UNKNOWN,true,"Improper index sort out[4] = %ld",out->data.U32[4]); \
-} \
-psFree(in); \
-
-psS32 main(psS32 argc,
-           char* argv[])
-{
-    psVector *in = NULL;
-    psVector *out = NULL;
-    psVector *tempVect = NULL;
-
-    // Test A - Sort vectors by index for all types
-    printPositiveTestHeader(stdout,"psVectorSortIndex","Sort by index for all types");
-    tstVectorSortIndexByType(S8,0)
-    tstVectorSortIndexByType(U8,1)
-    tstVectorSortIndexByType(S16,2)
-    tstVectorSortIndexByType(U16,3)
-    tstVectorSortIndexByType(S32,4)
-    tstVectorSortIndexByType(U32,5)
-    tstVectorSortIndexByType(S64,6)
-    tstVectorSortIndexByType(U64,7)
-    tstVectorSortIndexByType(F32,8)
-    tstVectorSortIndexByType(F64,9)
-    psFree(out);
-    printFooter(stdout,"psVectorSortIndex","Sort by index for all types",true);
-
-    // Test  C  Attempt to sort with null input vector
-    printPositiveTestHeader(stdout,"psVectorSortIndex","Attempt to sort with NULL input");
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message");
-    in = NULL;
-    out = psVectorAlloc(5,PS_TYPE_U32);
-    out = psVectorSortIndex(out,in);
-    if(out != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Did not return NULL with NULL input specified");
-        return 111;
-    }
-    printFooter(stdout,"psVectorSortIndex","Attempt to sort with NULL input",true);
-
-    // Test  D  Sort with output vector which needs to be resized
-    printPositiveTestHeader(stdout,"psVectorSortIndex","Sort with resize output vector");
-    in = psVectorAlloc(5,PS_TYPE_U8);
-    for(psS32 m=0; m<5; m++) {
-        in->data.U8[m]= 20-m;
-        in->n++;
-    }
-    out = psVectorAlloc(3,PS_TYPE_U32);
-    out->n = 3;
-    out = psVectorSortIndex(out,in);
-    if(out->n != 5) {
-        psError(PS_ERR_UNKNOWN,true,"Did not properly resize output vector");
-        return 112;
-    }
-    if(out->data.U32[0] != 4) {
-        psError(PS_ERR_UNKNOWN,true,"Did not properly sort index out[0] = %d",out->data.U32[0]);
-        return 113;
-    }
-    if(out->data.U32[1] != 3) {
-        psError(PS_ERR_UNKNOWN,true,"Did not properly sort index out[1] = %d",out->data.U32[1]);
-        return 114;
-    }
-    if(out->data.U32[2] != 2) {
-        psError(PS_ERR_UNKNOWN,true,"Did not properly sort index out[2] = %d",out->data.U32[2]);
-        return 115;
-    }
-    if(out->data.U32[3] != 1) {
-        psError(PS_ERR_UNKNOWN,true,"Did not properly sort index out[3] = %d",out->data.U32[3]);
-        return 116;
-    }
-    if(out->data.U32[4] != 0) {
-        psError(PS_ERR_UNKNOWN,true,"Did not properly sort index out[4] = %d",out->data.U32[4]);
-        return 117;
-    }
-    psFree(in);
-    psFree(out);
-    printFooter(stdout,"psVectorSortIndex","Sort with resize output vector",true);
-
-    // Test E - Sort input vector with zero elements
-    printPositiveTestHeader(stdout,"psVectorSortIndex","Sort with input vector with zero elements");
-    in = psVectorAlloc(5,PS_TYPE_U8);
-    out = psVectorAlloc(5,PS_TYPE_U32);
-    in->n = 0;
-    out->n = 0;
-    tempVect = out;
-    out = psVectorSortIndex(out,in);
-    if ( out != tempVect ) {
-        psError(PS_ERR_UNKNOWN,true,"Did not return the same output vector");
-        return 118;
-    }
-    in->n=5;
-    out->n=5;
-    psFree(out);
-    psFree(in);
-    printFooter(stdout,"psVectorSortIndex","Sort with input vector with zero elements",true);
-
-    // Test F - Attempt to sort input vector with invalid type
-    printPositiveTestHeader(stdout,"psVectorSortIndex","Attempt to sort with invalid type");
-    in = psVectorAlloc(5,PS_TYPE_U8);
-    out = psVectorAlloc(5,PS_TYPE_U32);
-    in->n = 5;
-    out->n = 5;
-    tempVect = out;
-    in->type.type = PS_TYPE_BOOL;
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate two error messages(psVectorSort,psVectorSortIndex)");
-    out = psVectorSortIndex(out,in);
-    if( out != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Did not return NULL on error or didn't error?");
-        return 119;
-    }
-    in->type.type = PS_TYPE_U8;
-    psFree(in);
-    printFooter(stdout,"psVectorSortIndex","Attempt to sort with invalid type",true);
-
-    // Test G - Free vectors
-    printPositiveTestHeader(stdout,"psVectorSortIndex", "Free vectors");
-    psS32 nLeaks = psMemCheckLeaks(0, NULL, stdout, false);
-    if(nLeaks) {
-        printf("ERROR: Found %d memory leaks\n", nLeaks);
-        return 222;
-    }
-    psS32 nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-        return 333;
-    }
-    printFooter(stdout, "psVectorSort", "Free vectors", true);
-
-}
Index: unk/psLib/test/mathtypes/tst_psVectorSort_03.c
===================================================================
--- /trunk/psLib/test/mathtypes/tst_psVectorSort_03.c	(revision 12918)
+++ 	(revision )
@@ -1,84 +1,0 @@
-/** @file  tst_psVectorSort_03.c
- *
- *  @brief Test driver for psVectorSort functions
- *
- *  This test driver contains the following tests for psVectorSort test point 3:
- *     A)  Create float vectors of different sizes
- *     B)  Attempt to sort vectors...should get errors
- *     C)  Create float vector and double vector
- *     D)  Attempt to sort vectors...should get errors
- *     E)  Free float, double vectors
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2005-07-13 02:47:00 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-psS32 main(psS32 argc,
-           char* argv[])
-{
-    psVector *in = NULL;
-    psVector *out = NULL;
-    psVector *in2 = NULL;
-    psVector *out2 = NULL;
-
-    // Test A - Create float vectors
-    printPositiveTestHeader(stdout,"psVectorSort", "Create float vectors of different sizes");
-    in = psVectorAlloc(5, PS_TYPE_F32);
-    in->n = 5;
-    out = psVectorAlloc(6, PS_TYPE_F32);
-    out->n = 6;
-    in->n = 5;
-    for(psS32 i=0; i<5; i++) {
-        printf("arr[%d] = %f\n", i, in->data.F32[i]);
-    }
-    printFooter(stdout, "psVectorSort", "Create float vectors of different sizes", true);
-
-
-    // Test B - Sort input float vector and put results into output float vector
-    printNegativeTestHeader(stdout,"psVectorSort", "Sort float vector",
-                            "Input and output vector sizes are not equal", 0);
-    out = psVectorSort(out, in);
-    printFooter(stdout, "psVectorSort", "Sort float vector", true);
-
-    // Test C - Create float vector and double vector
-    printPositiveTestHeader(stdout,"psVectorSort","Create float & double vectors of same size");
-    in2 = psVectorAlloc(5, PS_TYPE_F32);
-    in2->n = 5;
-    out2 = psVectorAlloc(5, PS_TYPE_F64);
-    out2->n = 5;
-    for(psS32 j=0; j<5; j++) {
-        printf("vec[%d] = %f\n", j, in2->data.F32[j]);
-    }
-    printFooter(stdout, "psVectorSort", "Create float and double vectors same size", true);
-
-    // Test D - Attempt to sort vectors with output of different type should create error
-    printNegativeTestHeader(stdout,"psVectorSort", "Sort F32/F64 vector",
-                            "Input and output vector different types", 0);
-    out2 = psVectorSort(out2, in2);
-    printFooter(stdout, "psVectorSort", "Sort float vector", true);
-
-    // Test C - Free float vectors
-    printPositiveTestHeader(stdout,"psVectorSort", "Free float vectors");
-    psFree(in);
-    psFree(in2);
-    psFree(out);
-    psFree(out2);
-    psS32 nLeaks = psMemCheckLeaks(0, NULL, stdout, false);
-    if(nLeaks) {
-        printf("ERROR: Found %d memory leaks\n", nLeaks);
-    }
-    psS32 nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psVectorSort", "Free float vectors", true);
-
-}
Index: unk/psLib/test/mathtypes/tst_psVectorSort_04.c
===================================================================
--- /trunk/psLib/test/mathtypes/tst_psVectorSort_04.c	(revision 12918)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/** @file  tst_psVectorSort_04.c
- *
- *  @brief Test driver for psVectorSort functions
- *
- *  This test driver contains the following tests for psVectorSort test point 4:
- *     A)  Attempt to sort with null input vector
- *     B)  Free vectors
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2005-07-13 02:47:00 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-psS32 main(psS32 argc,
-           char* argv[])
-{
-    psVector *badIn = NULL;
-    psVector *goodOut = psVectorAlloc(5, PS_TYPE_F32);
-
-    // Test A - Attempt to sort with null input vector
-    printNegativeTestHeader(stdout,"psVectorSort", "Attempt to sort with null input vector",
-                            "Null input vector", 0);
-    goodOut = psVectorSort(goodOut, badIn);
-    printFooter(stdout, "psVectorSort", "Attempt to sort with null input vector", true);
-
-    // Test B - Free vectors
-    printPositiveTestHeader(stdout, "psVectorSort", "Free vectors");
-    psFree(goodOut);
-    psS32 nLeaks = psMemCheckLeaks(0, NULL, stdout, false);
-    if(nLeaks) {
-        printf("ERROR: Found %d memory blocks\n", nLeaks);
-    }
-    psS32 nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psVectorSort", "Free arays", true);
-
-    return 0;
-}
