Add more numeric test cases
This commit is contained in:
parent
b23eb26ffe
commit
13f66aea14
1 changed files with 30 additions and 1 deletions
|
@ -1,5 +1,34 @@
|
|||
;; -*- mode: lisp; -*-
|
||||
|
||||
(assert (= 1 1))
|
||||
|
||||
(assert (!= 1 2))
|
||||
(assert (= 1 1.0))
|
||||
(assert (= 1.0 1.0))
|
||||
(assert (!= 1.0 1.1))
|
||||
|
||||
(assert (= (+ 1 2) 3))
|
||||
(assert (= (+ 1 2.1) 3.1))
|
||||
|
||||
(assert (= (- 1 2) -1))
|
||||
(assert (= (- 1 2.1) -1.1))
|
||||
|
||||
(assert (= (- 1 -2) 3))
|
||||
(assert (= (- 1 -2.1) 3.1))
|
||||
|
||||
(assert (= (- 0 0) 0))
|
||||
(assert (= (- 0 -0) 0))
|
||||
(assert (= (+ 0 0) 0))
|
||||
|
||||
(assert (= (* 2 3) 6))
|
||||
(assert (= (* 2 2.1) 4.2))
|
||||
|
||||
(assert (= (* 2 0) 0))
|
||||
(assert (= (* 0 2.1) 0))
|
||||
|
||||
(assert (= (/ 4 2) 2))
|
||||
(assert (= (/ 1 2) 0.5))
|
||||
|
||||
(assert (= (/ 4 -2) -2))
|
||||
(assert (= (/ 1 -2) -0.5))
|
||||
|
||||
(assert (= (/ 5 2.5) 2))
|
||||
|
|
Loading…
Reference in a new issue