mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Add test for crypto_fast_rng_get_double().
This commit is contained in:
parent
acbde10fce
commit
3f28b98220
@ -207,6 +207,10 @@ test_crypto_rng_fast(void *arg)
|
||||
uint64_t u64 = crypto_fast_rng_get_uint64(rng, UINT64_C(1)<<40);
|
||||
tt_u64_op(u64, OP_GE, 0);
|
||||
tt_u64_op(u64, OP_LT, UINT64_C(1)<<40);
|
||||
|
||||
double d = crypto_fast_rng_get_double(rng);
|
||||
tt_assert(d >= 0.0);
|
||||
tt_assert(d < 1.0);
|
||||
}
|
||||
|
||||
/* All values should have come up once. */
|
||||
|
Loading…
Reference in New Issue
Block a user