Index: trunk/psLib/test/math/tap_psStats00.c
===================================================================
--- trunk/psLib/test/math/tap_psStats00.c	(revision 10831)
+++ trunk/psLib/test/math/tap_psStats00.c	(revision 10848)
@@ -1,35 +1,31 @@
-@file  tst_psStats00.c
-*
-*  @brief Contains tests for psVectorStats with sample mean calculations
-*
-*  We extensively test the code with data type PS_TYPE_F32.  If these pass, we
-*  do
-    a much simpler test with data type PS_TYPE_U8, PS_TYPE_U16, PS_TYPE_F64.
-    *
-    *  @author GLG, MHPCC
-    *
-*  @version $Revision:
-1.8 $  $Name:
-    $
-*  @date $Date:
-2006/07/28 00:
-44:
-    05 $
-    *
-    *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
-    */
-    #include <stdio.h>
-    #include <string.h>
-    #include <pslib.h>
-    #include "tap.h"
-    #include "pstap.h"
-
-    #define N 15
-
-    static psF32 samplesF32[N] =
-            {
-                1.1, 2.2, -3.3, 4.4, 5.5, -6.6, 7.7, 8.8, -9.9, 10.0,
-                11.01, -12.02, 13.03, 14.04, -15.05
-            };
+/** @file  tst_psStats00.c
+ *
+ *  @brief Contains tests for psVectorStats with sample mean calculations
+ *
+ 
+ *  We extensively test the code with data type PS_TYPE_F32.  If these pass, we do a much
+ *  simpler test with data type PS_TYPE_U8, PS_TYPE_U16, PS_TYPE_F64.
+ *
+ *  @author GLG, MHPCC
+ *
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-29 04:38:42 $
+ *
+ *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <pslib.h>
+#include "tap.h"
+#include "pstap.h"
+
+#define N 15
+
+static psF32 samplesF32[N] =
+    {
+        1.1, 2.2, -3.3, 4.4, 5.5, -6.6, 7.7, 8.8, -9.9, 10.0,
+        11.01, -12.02, 13.03, 14.04, -15.05
+    };
 static psS8  samplesS8[N]  =
     {
@@ -92,5 +88,6 @@
     {
         psMemId id = psMemGetId();
-        myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        bool result = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4,
@@ -102,5 +99,6 @@
     {
         psMemId id = psMemGetId();
-        myStats = psVectorStats(myStats, myVector, myErrors, NULL, 0);
+        bool result = psVectorStats(myStats, myVector, myErrors, NULL, 0);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskF32);
@@ -114,5 +112,6 @@
         myStats->min = -10.0;
         myStats->max =   8.0;
-        myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        bool result = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanRangeNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeNoMaskF32);
@@ -125,5 +124,6 @@
         psMemId id = psMemGetId();
         myStats->options = PS_STAT_SAMPLE_MEAN | PS_STAT_USE_RANGE;
-        myStats = psVectorStats(myStats, myVector, myErrors, NULL, 0);
+        bool result = psVectorStats(myStats, myVector, myErrors, NULL, 0);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskRangeF32);
@@ -135,5 +135,6 @@
         psMemId id = psMemGetId();
         myStats->options = PS_STAT_SAMPLE_MEAN;
-        myStats = psVectorStats(myStats, myVector, NULL, maskVector, 1);
+        bool result = psVectorStats(myStats, myVector, NULL, maskVector, 1);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
@@ -144,5 +145,6 @@
     {
         psMemId id = psMemGetId();
-        myStats = psVectorStats(myStats, myVector, myErrors, maskVector, 1);
+        bool result = psVectorStats(myStats, myVector, myErrors, maskVector, 1);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskF32);
@@ -154,5 +156,6 @@
         psMemId id = psMemGetId();
         myStats->options = PS_STAT_SAMPLE_MEAN | PS_STAT_USE_RANGE;
-        myStats = psVectorStats(myStats, myVector, NULL, maskVector, 1);
+        bool result = psVectorStats(myStats, myVector, NULL, maskVector, 1);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanRangeWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeWithMaskF32);
@@ -163,5 +166,6 @@
     {
         psMemId id = psMemGetId();
-        myStats = psVectorStats(myStats, myVector, myErrors, maskVector, 1);
+        bool result = psVectorStats(myStats, myVector, myErrors, maskVector, 1);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskRangeF32);
@@ -178,5 +182,6 @@
             }
         }
-        myStats = psVectorStats(myStats, myVector, NULL, maskVector, 2);
+        bool result = psVectorStats(myStats, myVector, NULL, maskVector, 2);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);
@@ -193,5 +198,6 @@
             }
         }
-        myStats = psVectorStats(myStats, myVector, NULL, maskVector, 4);
+        bool result = psVectorStats(myStats, myVector, NULL, maskVector, 4);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32);
@@ -206,5 +212,6 @@
             maskVector->data.U8[i] = 1;
         }
-        myStats = psVectorStats(myStats, myVector, NULL, maskVector, 1);
+        bool result = psVectorStats(myStats, myVector, NULL, maskVector, 1);
+        ok(result, "psVectorStats suceeded");
         ok(isnan(myStats->sampleMean), "psVectorStats() returned NAN");
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
@@ -214,18 +221,8 @@
     {
         psMemId id = psMemGetId();
-        ok(psVectorStats(myStats, NULL, NULL, NULL, 0) == NULL, "psVectorStats() returned NULL with NULL inputs");
-        ok(psVectorStats(NULL, myVector, NULL, NULL, 0) == NULL, "psVectorStats() returned NULL with NULL inputs");
-        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
-    }
-
-
-
-
-
-
-
-
-
-
+        ok(!psVectorStats(myStats, NULL, NULL, NULL, 0), "psVectorStats() returned false with NULL inputs");
+        ok(!psVectorStats(NULL, myVector, NULL, NULL, 0), "psVectorStats() returned false with NULL inputs");
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
 
     psFree(myStats);
@@ -247,5 +244,6 @@
         }
 
-        myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        bool result = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskS8, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskS8);
@@ -267,5 +265,6 @@
         }
 
-        myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        bool result = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskU16, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskU16);
@@ -286,5 +285,6 @@
         }
 
-        myStats = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        bool result = psVectorStats(myStats, myVector, NULL, NULL, 0);
+        ok(result, "psVectorStats suceeded");
         ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN");
         ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF64, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF64);
