Add test for math operations
This commit is contained in:
parent
a9b9d5efa1
commit
c79d4b8402
1 changed files with 16 additions and 0 deletions
16
t/math.t
Normal file
16
t/math.t
Normal file
|
@ -0,0 +1,16 @@
|
|||
(expect "add" (= (+ 2 4 2) 8))
|
||||
(expect "sub" (= (- 8 2 3) 3))
|
||||
(expect "mul" (= (* 5 6) 30))
|
||||
(expect "div" (= (/ 64 4) 16))
|
||||
|
||||
(expect "2 is even" (evenp 2))
|
||||
(expect "3 is not even" (not (evenp 3)))
|
||||
|
||||
(expect "5 is odd" (oddp 5))
|
||||
(expect "6 is not odd" (not (oddp 6)))
|
||||
|
||||
(expect "0 is 0" (zerop 0))
|
||||
(expect "1 is not 0" (not (zerop 1)))
|
||||
|
||||
(expect "max" (= (max 5 30) 30))
|
||||
(expect "min" (= (min 5 30) 5))
|
Loading…
Reference in a new issue