comparison tests/automated/lisp-tests.el @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents da8ed4261e83
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
227 (Assert (= (+ 1.0 3.0 0.0) 4.0)) 227 (Assert (= (+ 1.0 3.0 0.0) 4.0))
228 (Assert (= (+ 1 1.0) 2.0)) 228 (Assert (= (+ 1 1.0) 2.0))
229 (Assert (= (+ 1.0 1) 2.0)) 229 (Assert (= (+ 1.0 1) 2.0))
230 (Assert (= (+ 1.0 1 1) 3.0)) 230 (Assert (= (+ 1.0 1 1) 3.0))
231 (Assert (= (+ 1 1 1.0) 3.0)) 231 (Assert (= (+ 1 1 1.0) 3.0))
232 (Assert (eq (1+ most-positive-fixnum) most-negative-fixnum))
233 (Assert (eq (+ most-positive-fixnum 1) most-negative-fixnum))
232 234
233 ;; Test `-' 235 ;; Test `-'
234 (Check-Error wrong-number-of-arguments (-)) 236 (Check-Error wrong-number-of-arguments (-))
235 (Assert (eq (- 0) 0)) 237 (Assert (eq (- 0) 0))
236 (Assert (eq (- 1) -1)) 238 (Assert (eq (- 1) -1))
250 (Assert (= (- zero zero) 0)) 252 (Assert (= (- zero zero) 0))
251 (Assert (= (- zero one one) -2)))) 253 (Assert (= (- zero one one) -2))))
252 254
253 (Assert (= (- 1.5 1) .5)) 255 (Assert (= (- 1.5 1) .5))
254 (Assert (= (- 1 1.5) (- .5))) 256 (Assert (= (- 1 1.5) (- .5)))
257
258 (Assert (eq (1- most-negative-fixnum) most-positive-fixnum))
259 (Assert (eq (- most-negative-fixnum 1) most-positive-fixnum))
255 260
256 ;; Test `/' 261 ;; Test `/'
257 262
258 ;; Test division by zero errors 263 ;; Test division by zero errors
259 (dolist (zero '(0 0.0 ?\0)) 264 (dolist (zero '(0 0.0 ?\0))