summaryrefslogtreecommitdiff
path: root/test/rand.t.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/rand.t.c')
-rw-r--r--test/rand.t.c10
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);
+ }
+}