3 (deftestsuite integer-math
() ())
5 (defrandom-instance an-integer nil
(- (random 200) 100))
7 (addtest (integer-math)
9 (with-random-cases 10 ((a an-integer
) (b an-integer
))
10 (format t
"~&~a ~a" a b
)
11 (ensure-same (+ a b
) (+ b a
) :test
=)))
13 (deftestsuite small-positive-integer-math
(integer-math)
16 (addtest (small-positive-integer-math)
18 (with-random-cases 10 ((a an-integer
) (b an-integer
))
19 (ensure-same (+ a b
) (+ b a
) :test
=)))
21 (addtest (small-positive-integer-math)
23 (with-random-cases 10 ((a an-integer
) (b an-integer
))
24 (ensure (< (+ a b
) 15))))
26 (defrandom-instance an-integer small-positive-integer-math
29 (deftestsuite small-positive-integer-math
(integer-math)
31 (:random-instance an-integer
(1+ (random 10))))