blob: 1942a1d312d0404095c63fe853b2af0011f61095 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
(assert (= 1 (+ 1 0)))
(assert (= -1 (- 0 1)))
(assert (= -1 (- 1)))
(assert (= 1.1 (+ 1 0.1)))
(assert (= 2 (i/ 11 5)))
(assert (= 1 (mod 11 5)))
(assert (zerop 0))
(assert (not (zerop 1)))
(assert (not (zerop -1)))
(assert (plusp 1))
(assert (plusp 1.0))
(assert (not (plusp 0)))
(assert (not (plusp -1)))
(assert (minusp -1))
(assert (not (minusp 0)))
(assert (not (minusp 1)))
(assert (< 1 2))
(assert (< 1.0 2))
(assert (not (> 1 2)))
(assert (= 1.0 1.0))
(assert (= 1 1.0))
(assert (not (= 1 2)))
(assert (>= 2 1))
(assert (>= 1 1))
(assert (not (>= 0 1)))
(assert (/= 2 1.0))
(assert (not (/= 1 1)))
(assert (= 1.0 (max -2 0.1 0.2 1)))
(assert (= 1.0 (min 1 2.0 3.2 4 100)))
(assert (= 3 (max 3)))
(assert (= 3 (min 3)))
(assert-error (max))
(assert-error (min))
(assert-error (+ 1 "a"))
(assert-error (- 1 "a"))
(assert-error (* 1 "a"))
(assert-error (/ 1 "a"))
|