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.
This commit is contained in:
Danny Robson 2014-04-10 21:04:56 +10:00
parent 6074ccdd21
commit 21b2b2368c

View File

@ -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;