Changeset 12607 for trunk/psLib/test/math/tap_psStats00.c
- Timestamp:
- Mar 27, 2007, 12:52:03 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/math/tap_psStats00.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/math/tap_psStats00.c
r12242 r12607 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $12 * @date $Date: 2007-03- 05 23:23:38$11 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-03-27 22:52:03 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii … … 120 120 ok(result, "psVectorStats suceeded (F32: no mask vector, no error vector)"); 121 121 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 122 ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4,122 is_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4, 123 123 "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32); 124 124 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); … … 131 131 ok(result, "psVectorStats suceeded (F32: no mask vector, with error vector)"); 132 132 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 133 ok_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskF32);133 is_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskF32); 134 134 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 135 135 } … … 144 144 ok(result, "psVectorStats suceeded (F32, no mask, no errors, with data range)"); 145 145 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 146 ok_float_tol(myStats->sampleMean, expectedMeanRangeNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeNoMaskF32);146 is_float_tol(myStats->sampleMean, expectedMeanRangeNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeNoMaskF32); 147 147 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 148 148 } … … 156 156 ok(result, "psVectorStats suceeded (F32, no mask, with errors and data range)"); 157 157 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 158 ok_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskRangeF32);158 is_float_tol(myStats->sampleMean, expectedWeightMeanNoMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanNoMaskRangeF32); 159 159 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 160 160 } … … 167 167 ok(result, "psVectorStats suceeded (F32, with mask, no errors)"); 168 168 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 169 ok_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);169 is_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32); 170 170 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 171 171 } … … 177 177 ok(result, "psVectorStats suceeded (F32, with mask and errors)"); 178 178 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 179 ok_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskF32);179 is_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskF32); 180 180 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 181 181 } … … 188 188 ok(result, "psVectorStats suceeded (F32, with mask and data range)"); 189 189 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 190 ok_float_tol(myStats->sampleMean, expectedMeanRangeWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeWithMaskF32);190 is_float_tol(myStats->sampleMean, expectedMeanRangeWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanRangeWithMaskF32); 191 191 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 192 192 } … … 198 198 ok(result, "psVectorStats suceeded (F32, withmask, errors, and data range)"); 199 199 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 200 ok_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskRangeF32);200 is_float_tol(myStats->sampleMean, expectedWeightMeanWithMaskRangeF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedWeightMeanWithMaskRangeF32); 201 201 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 202 202 } … … 214 214 ok(result, "psVectorStats suceeded (F32, with mask = 2, no errors)"); 215 215 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 216 ok_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32);216 is_float_tol(myStats->sampleMean, expectedMeanWithMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanWithMaskF32); 217 217 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 218 218 } … … 230 230 ok(result, "psVectorStats suceeded (F32, with mask = 3, no errors)"); 231 231 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 232 ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32);232 is_float_tol(myStats->sampleMean, expectedMeanNoMaskF32, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF32); 233 233 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 234 234 } … … 276 276 ok(result, "psVectorStats suceeded (S8, no mask, no errors)"); 277 277 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 278 ok_float_tol(myStats->sampleMean, expectedMeanNoMaskS8, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskS8);278 is_float_tol(myStats->sampleMean, expectedMeanNoMaskS8, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskS8); 279 279 psFree(myStats); 280 280 psFree(myVector); … … 297 297 ok(result, "psVectorStats suceeded (U16, no mask, no errors)"); 298 298 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 299 ok_float_tol(myStats->sampleMean, expectedMeanNoMaskU16, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskU16);299 is_float_tol(myStats->sampleMean, expectedMeanNoMaskU16, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskU16); 300 300 psFree(myStats); 301 301 psFree(myVector); … … 317 317 ok(result, "psVectorStats suceeded (F64, no mask, no errors)"); 318 318 ok(!isnan(myStats->sampleMean), "psVectorStats() returned non-NAN"); 319 ok_float_tol(myStats->sampleMean, expectedMeanNoMaskF64, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF64);319 is_float_tol(myStats->sampleMean, expectedMeanNoMaskF64, 1e-4, "The mean was %f, should be %f", myStats->sampleMean, expectedMeanNoMaskF64); 320 320 psFree(myStats); 321 321 psFree(myVector);
Note:
See TracChangeset
for help on using the changeset viewer.
