From 21b2b2368c0679fec4532b485df04e4677838a76 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 10 Apr 2014 21:04:56 +1000 Subject: [PATCH] Increase rand test iterations Sometimes we get test errors when running the rand test. Obviously this is expected a little based on the implementation, but we can reduce the chance by increasing the iterations for the test. --- test/rand.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/rand.cpp b/test/rand.cpp index 4826e9ed..041c5d89 100644 --- a/test/rand.cpp +++ b/test/rand.cpp @@ -12,7 +12,7 @@ using namespace std; // TODO: Use a more robust test like Chi-Square void test_bool (void) { - static const unsigned ITERATIONS = 1024; + static const unsigned ITERATIONS = 8192; static const unsigned THRESHOLD = ITERATIONS * 0.1; unsigned counts[2] = { 0, 0 }; @@ -31,7 +31,7 @@ test_bool (void) { void test_float (void) { static const unsigned BUCKETS = 8; - static const unsigned ITERATIONS = 4096; + static const unsigned ITERATIONS = 8912; static const unsigned EXPECTED = ITERATIONS / BUCKETS; static const float THRESHOLD = EXPECTED * 0.1;