Add tests for mod function

This commit is contained in:
madmaurice 2021-04-05 03:53:44 +02:00
parent 941bd17ac6
commit b4e46a9b40

View file

@ -14,3 +14,17 @@
(expect "max - 2 parameters" (= (max 5 30) 30))
(expect "min - 2 parameters" (= (min 5 30) 5))
(comment (mod -1 5))
(expect "mod - (mod -1 5) == 4"
(= (mod -1 5) 4))
(expect "mod - (mod 13 4) == 1"
(= (mod 13 4) 1))
(expect "mod - (mod 13.5 1) == 0.5"
(= (mod 13.5 1) 0.5))
(expect "mod - (mod -13.5 1) == 0.5"
(= (mod -13.5 1) 0.5))