reset rng injection before runnign test.

This commit is contained in:
Enno Rehling 2021-03-12 20:43:43 +01:00
parent dd23307e8e
commit 9c8df88525
1 changed files with 9 additions and 8 deletions

View File

@ -1,16 +1,17 @@
#ifdef _MSC_VER
#include <platform.h>
#endif
#include "rng.h"
#include "rand.h"
#include "tests.h"
#include <CuTest.h>
#include <ctype.h>
#include "rng.h"
#include "rand.h"
static void test_rng_round(CuTest * tc)
{
double f = rng_double();
double r = RAND_ROUND(f);
double f, r;
test_setup();
f = rng_double();
r = RAND_ROUND(f);
CuAssertTrue(tc, f >= 0);
CuAssertTrue(tc, r <= f + 1);
CuAssertTrue(tc, r >= f);