diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-12-08 09:21:32 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-12-08 09:21:32 -0700 |
commit | b5ad184c1bcef78e7c2b052bcffc71f4c7381bcb (patch) | |
tree | f060afc8dc7e896ad48731b58b5414b4c6ab627b /test/rand.t.c | |
parent | b8c662456f2caf219de2a21f137f8fd61e34b0b2 (diff) | |
download | cmath-b5ad184c1bcef78e7c2b052bcffc71f4c7381bcb.tar.gz cmath-b5ad184c1bcef78e7c2b052bcffc71f4c7381bcb.zip |
hw8 checkpoint
Diffstat (limited to 'test/rand.t.c')
-rw-r--r-- | test/rand.t.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rand.t.c b/test/rand.t.c new file mode 100644 index 0000000..9ed2e9c --- /dev/null +++ b/test/rand.t.c @@ -0,0 +1,10 @@ +#include "lizfcm.test.h" + +UTEST(rand, rand_from) { + double min = -2.0; + double max = 5.0; + for (size_t i = 0; i < 1000; i++) { + double r = rand_from(min, max); + ASSERT_TRUE(min <= r && r <= max); + } +} |