forked from github/server
indentation fixes for this new file
This commit is contained in:
parent
02f92f7932
commit
5e0c934c6f
1 changed files with 14 additions and 14 deletions
|
@ -5,22 +5,22 @@
|
||||||
|
|
||||||
static void test_rng_round(CuTest * tc)
|
static void test_rng_round(CuTest * tc)
|
||||||
{
|
{
|
||||||
double f;
|
double f;
|
||||||
int i, r;
|
int i, r;
|
||||||
for (i = 0; i < 1000; ++i) {
|
for (i = 0; i < 1000; ++i) {
|
||||||
f = rng_double();
|
f = rng_double();
|
||||||
r = RAND_ROUND(f);
|
r = RAND_ROUND(f);
|
||||||
CuAssertTrue(tc, f >= 0);
|
CuAssertTrue(tc, f >= 0);
|
||||||
CuAssertTrue(tc, r <= (int ) f + 1);
|
CuAssertTrue(tc, r <= (int)f + 1);
|
||||||
CuAssertTrue(tc, r >= (int ) f);
|
CuAssertTrue(tc, r >= (int)f);
|
||||||
CuAssertTrue(tc, r == (int ) r);
|
CuAssertTrue(tc, r == (int)r);
|
||||||
CuAssertTrue(tc, r == RAND_ROUND(r));
|
CuAssertTrue(tc, r == RAND_ROUND(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CuSuite *get_rng_suite(void)
|
CuSuite *get_rng_suite(void)
|
||||||
{
|
{
|
||||||
CuSuite *suite = CuSuiteNew();
|
CuSuite *suite = CuSuiteNew();
|
||||||
SUITE_ADD_TEST(suite, test_rng_round);
|
SUITE_ADD_TEST(suite, test_rng_round);
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue