Index: trunk/psLib/test/dataManip/tst_psStats04.c
===================================================================
--- trunk/psLib/test/dataManip/tst_psStats04.c	(revision 779)
+++ trunk/psLib/test/dataManip/tst_psStats04.c	(revision 887)
@@ -1,5 +1,8 @@
 /*****************************************************************************
     This routine must ensure that PS_STAT_NVALUES is correctly computed
-    by the procedure psArrayStats().
+    by the procedure psVectorStats().
+ 
+    Note: The NVALUES stat was removed from the IfA requirements spec.  So,
+    this test is no longer in use.
  *****************************************************************************/
 #include <stdio.h>
@@ -12,5 +15,4 @@
 {
     psStats *myStats    = NULL;
-    psStats *myStats2   = NULL;
     int testStatus      = true;
     int i               = 0;
@@ -18,29 +20,40 @@
     psVector *maskVector= NULL;
 
+    /*************************************************************************/
+    /*  Allocate and initialize data structures                      */
+    /*************************************************************************/
+    myStats = psStatsAlloc(PS_STAT_NVALUES);
+    myVector = psVectorAlloc(N, PS_TYPE_F32);
+    myVector->n = N;
+    maskVector = psVectorAlloc(N, PS_TYPE_U8);
+    maskVector->n = N;
+
+    // Set the appropriate values for the vector data.
+    for (i=0;i<N;i++) {
+        myVector->data.F32[i] = (float) i;
+    }
+
+    // Set the mask vector and calculate the expected maximum.
+    for (i=0;i<N;i++) {
+        if (i < (N/2)) {
+            maskVector->data.U8[i] = 0;
+        } else {
+            maskVector->data.U8[i] = 1;
+        }
+    }
+
+    /*************************************************************************/
+    /*  Call psVectorStats() with no vector mask.                    */
+    /*************************************************************************/
     printPositiveTestHeader(stdout,
                             "psStats functions",
                             "PS_STAT_NVALUES");
 
-    myStats = psStatsAlloc(PS_STAT_NVALUES);
-    myVector = psVectorAlloc(PS_TYPE_FLOAT, N);
-    myVector->n = N;
-    maskVector = psVectorAlloc(PS_TYPE_UINT8, N);
-    maskVector->n = N;
+    myStats = psVectorStats(myStats, myVector, NULL, 0);
 
-    for (i=0;i<N;i++) {
-        myVector->vec.f[i] = (float) i;
-        if (i < (N/2)) {
-            maskVector->vec.ui8[i] = 0;
-        } else {
-            maskVector->vec.ui8[i] = 1;
-        }
-    }
-
-    myStats2 = psArrayStats(myVector, NULL, 0, myStats);
-
-    printf("Called psArrayStats() on a vector with no elements masked.\n");
+    printf("Called psVectorStats() on a vector with no elements masked.\n");
     printf("The expected nvalues was %d.  The calculated nvalues was %d.\n",
-           N, myStats2->nValues);
-    if (myStats2->nValues == N) {
+           N, myStats->nValues);
+    if (myStats->nValues == N) {
         testStatus = true;
     } else {
@@ -48,9 +61,12 @@
     }
 
-    myStats2 = psArrayStats(myVector, maskVector, 1, myStats);
-    printf("Called psArrayStats() on a vector with last N/2 elements masked.\n");
+    /*************************************************************************/
+    /*  Call psVectorStats() with vector mask.                       */
+    /*************************************************************************/
+    myStats = psVectorStats(myStats, myVector, maskVector, 1);
+    printf("Called psVectorStats() on a vector with last N/2 elements masked.\n");
     printf("The expected nvalues was %d.  The calculated nvalues was %d.\n",
-           N/2, myStats2->nValues);
-    if (myStats2->nValues == N/2) {
+           N/2, myStats->nValues);
+    if (myStats->nValues == N/2) {
         testStatus = true;
     } else {
