Add tests for mod function
This commit is contained in:
parent
941bd17ac6
commit
b4e46a9b40
1 changed files with 14 additions and 0 deletions
14
t/math.t
14
t/math.t
|
@ -14,3 +14,17 @@
|
||||||
|
|
||||||
(expect "max - 2 parameters" (= (max 5 30) 30))
|
(expect "max - 2 parameters" (= (max 5 30) 30))
|
||||||
(expect "min - 2 parameters" (= (min 5 30) 5))
|
(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))
|
||||||
|
|
Loading…
Reference in a new issue