Commit c7bcc4fa authored by sds's avatar sds
Browse files

untabify

parent 33e27a6d
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
(deftest abort.2 (deftest abort.2
(let ((c1 (make-condition 'error)) (let ((c1 (make-condition 'error))
(c2 (make-condition 'error))) (c2 (make-condition 'error)))
(restart-case (restart-case
(with-condition-restarts (with-condition-restarts
c1 c1
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
(deftest abort.4 (deftest abort.4
(let ((c1 (make-condition 'error)) (let ((c1 (make-condition 'error))
(c2 (make-condition 'error))) (c2 (make-condition 'error)))
(restart-case (restart-case
(with-condition-restarts (with-condition-restarts
c1 c1
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
(deftest abort.5 (deftest abort.5
(signals-error (signals-error
(let ((c1 (make-condition 'error)) (let ((c1 (make-condition 'error))
(c2 (make-condition 'error))) (c2 (make-condition 'error)))
(with-condition-restarts (with-condition-restarts
c1 c1
(compute-restarts) (compute-restarts)
......
...@@ -21,36 +21,36 @@ ...@@ -21,36 +21,36 @@
(deftest abs.1 (deftest abs.1
(loop for x in *numbers* (loop for x in *numbers*
for a = (abs x) for a = (abs x)
always (and (realp a) (not (minusp a)))) always (and (realp a) (not (minusp a))))
t) t)
(deftest abs.2 (deftest abs.2
(loop for x = (random-fixnum) (loop for x = (random-fixnum)
for a = (abs x) for a = (abs x)
repeat 10000 repeat 10000
unless (if (plusp x) (eql x a) (eql (- x) a)) unless (if (plusp x) (eql x a) (eql (- x) a))
collect (list x a)) collect (list x a))
nil) nil)
(deftest abs.3 (deftest abs.3
(let ((bound (ash 1 300))) (let ((bound (ash 1 300)))
(loop for x = (random-from-interval bound) (loop for x = (random-from-interval bound)
for a = (abs x) for a = (abs x)
repeat 10000 repeat 10000
unless (if (plusp x) (eql x a) (eql (- x) a)) unless (if (plusp x) (eql x a) (eql (- x) a))
collect (list x a))) collect (list x a)))
nil) nil)
(deftest abs.4 (deftest abs.4
(loop for num = (random-fixnum) (loop for num = (random-fixnum)
for den = (random-fixnum) for den = (random-fixnum)
for den2 = (if (zerop den) 1 den) for den2 = (if (zerop den) 1 den)
for r = (/ num den) for r = (/ num den)
for a = (abs r) for a = (abs r)
repeat 10000 repeat 10000
unless (if (>= r 0) (eql r a) (eql (- r) a)) unless (if (>= r 0) (eql r a) (eql (- r) a))
collect (list num den2 r a)) collect (list num den2 r a))
nil) nil)
(deftest abs.5 (deftest abs.5
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
for a = (abs x) for a = (abs x)
repeat 10000 repeat 10000
unless (if (minusp x) unless (if (minusp x)
(eql (- x) a) (eql (- x) a)
(eql x a)) (eql x a))
collect (list x a))) collect (list x a)))
nil) nil)
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
for a = (abs x) for a = (abs x)
repeat 10000 repeat 10000
unless (if (minusp x) unless (if (minusp x)
(eql (- x) a) (eql (- x) a)
(eql x a)) (eql x a))
collect (list x a))) collect (list x a)))
nil) nil)
...@@ -97,8 +97,8 @@ ...@@ -97,8 +97,8 @@
for a = (abs x) for a = (abs x)
repeat 10000 repeat 10000
unless (if (minusp x) unless (if (minusp x)
(eql (- x) a) (eql (- x) a)
(eql x a)) (eql x a))
collect (list x a))) collect (list x a)))
nil) nil)
...@@ -109,8 +109,8 @@ ...@@ -109,8 +109,8 @@
for a = (abs x) for a = (abs x)
repeat 10000 repeat 10000
unless (if (minusp x) unless (if (minusp x)
(eql (- x) a) (eql (- x) a)
(eql x a)) (eql x a))
collect (list x a))) collect (list x a)))
nil) nil)
...@@ -122,15 +122,15 @@ ...@@ -122,15 +122,15 @@
;;; (deftest abs.10 ;;; (deftest abs.10
;;; (abs -0.0s0) ;;; (abs -0.0s0)
;;; -0.0s0) ;;; -0.0s0)
;;; ;;;
;;; (deftest abs.11 ;;; (deftest abs.11
;;; (abs -0.0f0) ;;; (abs -0.0f0)
;;; -0.0f0) ;;; -0.0f0)
;;; ;;;
;;; (deftest abs.12 ;;; (deftest abs.12
;;; (abs -0.0d0) ;;; (abs -0.0d0)
;;; -0.0d0) ;;; -0.0d0)
;;; ;;;
;;; (deftest abs.13 ;;; (deftest abs.13
;;; (abs -0.0l0) ;;; (abs -0.0l0)
;;; -0.0l0) ;;; -0.0l0)
...@@ -175,5 +175,5 @@ ...@@ -175,5 +175,5 @@
(deftest abs.22 (deftest abs.22
(macrolet ((%m (z) z)) (macrolet ((%m (z) z))
(abs (expand-in-current-env (%m -4)))) (abs (expand-in-current-env (%m -4))))
4) 4)
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
(deftest acons.1 (deftest acons.1
(let* ((x (copy-tree '((c . d) (e . f)))) (let* ((x (copy-tree '((c . d) (e . f))))
(xcopy (make-scaffold-copy x)) (xcopy (make-scaffold-copy x))
(result (acons 'a 'b x))) (result (acons 'a 'b x)))
(and (and
(check-scaffold-copy x xcopy) (check-scaffold-copy x xcopy)
(eqt (cdr result) x) (eqt (cdr result) x)
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
(let ((i 0) x y z) (let ((i 0) x y z)
(values (values
(acons (progn (setf x (incf i)) 'a) (acons (progn (setf x (incf i)) 'a)
(progn (setf y (incf i)) 'b) (progn (setf y (incf i)) 'b)
(progn (setf z (incf i)) '((c . d)))) (progn (setf z (incf i)) '((c . d))))
i x y z)) i x y z))
((a . b)(c . d)) ((a . b)(c . d))
3 1 2 3) 3 1 2 3)
......
...@@ -7,50 +7,50 @@ ...@@ -7,50 +7,50 @@
(deftest acos.1 (deftest acos.1
(loop for i from -1000 to 1000 (loop for i from -1000 to 1000
for rlist = (multiple-value-list (acos i)) for rlist = (multiple-value-list (acos i))
for y = (car rlist) for y = (car rlist)
always (and (null (cdr rlist)) always (and (null (cdr rlist))
(numberp y))) (numberp y)))
t) t)
(deftest acos.2 (deftest acos.2
(loop for type in '(short-float single-float double-float long-float) (loop for type in '(short-float single-float double-float long-float)
collect collect
(let ((a (coerce 2000 type)) (let ((a (coerce 2000 type))
(b (coerce -1000 type))) (b (coerce -1000 type)))
(loop for x = (- (random a) b) (loop for x = (- (random a) b)
for rlist = (multiple-value-list (acos x)) for rlist = (multiple-value-list (acos x))
for y = (car rlist) for y = (car rlist)
repeat 1000 repeat 1000
always (and (null (cdr rlist)) always (and (null (cdr rlist))
(numberp y))))) (numberp y)))))
(t t t t)) (t t t t))
(deftest acos.3 (deftest acos.3
(loop for type in '(integer short-float single-float double-float long-float) (loop for type in '(integer short-float single-float double-float long-float)
collect collect
(let ((a (coerce 2000 type)) (let ((a (coerce 2000 type))
(b (coerce -1000 type))) (b (coerce -1000 type)))
(loop for x = (- (random a) b) (loop for x = (- (random a) b)
for rlist = (multiple-value-list (acos (complex 0 x))) for rlist = (multiple-value-list (acos (complex 0 x)))
for y = (car rlist) for y = (car rlist)
repeat 1000 repeat 1000
always (and (null (cdr rlist)) always (and (null (cdr rlist))
(numberp y))))) (numberp y)))))
(t t t t t)) (t t t t t))
(deftest acos.4 (deftest acos.4
(loop for type in '(integer short-float single-float double-float long-float) (loop for type in '(integer short-float single-float double-float long-float)
collect collect
(let ((a (coerce 2000 type)) (let ((a (coerce 2000 type))
(b (coerce -1000 type))) (b (coerce -1000 type)))
(loop for x1 = (- (random a) b) (loop for x1 = (- (random a) b)
for x2 = (- (random a) b) for x2 = (- (random a) b)
for rlist = (multiple-value-list (acos (complex x1 x2))) for rlist = (multiple-value-list (acos (complex x1 x2)))
for y = (car rlist) for y = (car rlist)
repeat 1000 repeat 1000
always (and (null (cdr rlist)) always (and (null (cdr rlist))
(numberp y))))) (numberp y)))))
(t t t t t)) (t t t t t))
(deftest acos.5 (deftest acos.5
...@@ -59,23 +59,23 @@ ...@@ -59,23 +59,23 @@
(deftest acos.6 (deftest acos.6
(loop for type in '(single-float short-float double-float long-float) (loop for type in '(single-float short-float double-float long-float)
unless (approx= (acos (coerce 0 type)) unless (approx= (acos (coerce 0 type))
(coerce (/ pi 2) type)) (coerce (/ pi 2) type))
collect type) collect type)
nil) nil)
(deftest acos.7 (deftest acos.7
(loop for type in '(single-float short-float double-float long-float) (loop for type in '(single-float short-float double-float long-float)
unless (approx= (acos (coerce 1 type)) unless (approx= (acos (coerce 1 type))
(coerce 0 type)) (coerce 0 type))
collect type) collect type)
nil) nil)
(deftest acos.8 (deftest acos.8
(loop for type in '(single-float short-float double-float long-float) (loop for type in '(single-float short-float double-float long-float)
unless (approx= (acos (coerce -1 type)) unless (approx= (acos (coerce -1 type))
(coerce pi type)) (coerce pi type))
collect type) collect type)
nil) nil)
(deftest acos.9 (deftest acos.9
......
...@@ -8,64 +8,64 @@ ...@@ -8,64 +8,64 @@
(deftest acosh.1 (deftest acosh.1
(let ((result (acosh 1))) (let ((result (acosh 1)))
(or (eqlt result 0) (or (eqlt result 0)
(eqlt result 0.0))) (eqlt result 0.0)))
t) t)
(deftest acosh.2 (deftest acosh.2
(loop for type in '(short-float single-float double-float long-float) (loop for type in '(short-float single-float double-float long-float)
for zero = (coerce 0 type) for zero = (coerce 0 type)
for one = (coerce 1 type) for one = (coerce 1 type)
unless (equal (multiple-value-list (acosh one)) unless (equal (multiple-value-list (acosh one))
(list zero)) (list zero))
collect type) collect type)
nil) nil)
(deftest acosh.3 (deftest acosh.3
(loop for type in '(short-float single-float double-float long-float) (loop for type in '(short-float single-float double-float long-float)
for zero = (coerce 0 `(complex ,type)) for zero = (coerce 0 `(complex ,type))
for one = (coerce 1 `(complex ,type)) for one = (coerce 1 `(complex ,type))
unless (equal (multiple-value-list (acosh one)) unless (equal (multiple-value-list (acosh one))
(list zero)) (list zero))
collect type) collect type)
nil) nil)
(deftest acosh.4 (deftest acosh.4
(loop for den = (1+ (random 10000)) (loop for den = (1+ (random 10000))
for num = (random (* 10 den)) for num = (random (* 10 den))
for x = (/ num den) for x = (/ num den)
for rlist = (multiple-value-list (acosh x)) for rlist = (multiple-value-list (acosh x))
for y = (car rlist) for y = (car rlist)
repeat 1000 repeat 1000
unless (and (null (cdr rlist)) unless (and (null (cdr rlist))
(numberp y)) (numberp y))
collect (list x rlist)) collect (list x rlist))
nil) nil)
(deftest acosh.5 (deftest acosh.5
(loop for type in '(short-float single-float double-float long-float) (loop for type in '(short-float single-float double-float long-float)
nconc nconc
(loop (loop
for x = (1+ (random (coerce 1000 type))) for x = (1+ (random (coerce 1000 type)))
for rlist = (multiple-value-list (acosh x)) for rlist = (multiple-value-list (acosh x))
for y = (car rlist) for y = (car rlist)
repeat 1000 repeat 1000
unless (and (null (cdr rlist)) unless (and (null (cdr rlist))
(typep y type)) (typep y type))
collect (list x rlist))) collect (list x rlist)))
nil) nil)
(deftest acosh.6 (deftest acosh.6
(loop for type in '(short-float single-float double-float long-float) (loop for type in '(short-float single-float double-float long-float)
nconc nconc
(loop (loop
for x1 = (- (random (coerce 20 type)) 10) for x1 = (- (random (coerce 20 type)) 10)
for x2 = (- (random (coerce 20 type)) 10) for x2 = (- (random (coerce 20 type)) 10)
for rlist = (multiple-value-list (acosh (complex x1 x2))) for rlist = (multiple-value-list (acosh (complex x1 x2)))
for y = (car rlist) for y = (car rlist)
repeat 1000 repeat 1000
unless (and (null (cdr rlist)) unless (and (null (cdr rlist))
(typep y `(complex ,type))) (typep y `(complex ,type)))
collect (list x1 x2 rlist))) collect (list x1 x2 rlist)))
nil) nil)
(deftest acosh.7 (deftest acosh.7
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
(deftest add-method.error.2 (deftest add-method.error.2
(let* ((gf (eval '(defgeneric add-method-gf-03 (x) (let* ((gf (eval '(defgeneric add-method-gf-03 (x)
(:method ((x t)) 'a)))) (:method ((x t)) 'a))))
(method (find-method #'add-method-gf-03 nil (list (find-class t)))) (method (find-method #'add-method-gf-03 nil (list (find-class t))))
(gf2 (eval '(defgeneric add-method-gf-04 (x y))))) (gf2 (eval '(defgeneric add-method-gf-04 (x y)))))
(handler-case (handler-case
(add-method gf2 method) (add-method gf2 method)
(error () :error))) (error () :error)))
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
(deftest add-method.error.3 (deftest add-method.error.3
(let* ((gf (eval '(defgeneric add-method-gf-05 (x &optional y) (let* ((gf (eval '(defgeneric add-method-gf-05 (x &optional y)
(:method ((x t) &optional y) 'a)))) (:method ((x t) &optional y) 'a))))
(method (find-method #'add-method-gf-05 nil (list (find-class t)))) (method (find-method #'add-method-gf-05 nil (list (find-class t))))
(gf2 (eval '(defgeneric add-method-gf-06 (x y))))) (gf2 (eval '(defgeneric add-method-gf-06 (x y)))))
(handler-case (handler-case
(add-method gf2 method) (add-method gf2 method)
(error () :error))) (error () :error)))
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
(deftest add-method.error.6 (deftest add-method.error.6
(signals-error (signals-error
(let* ((gf (eval '(defgeneric add-method-gf-07 (x) (let* ((gf (eval '(defgeneric add-method-gf-07 (x)
(:method ((x t)) 'a)))) (:method ((x t)) 'a))))
(method (find-method #'add-method-gf-07 nil (list (find-class t)))) (method (find-method #'add-method-gf-07 nil (list (find-class t))))
(gf2 (eval '(defgeneric add-method-gf-08 (x))))) (gf2 (eval '(defgeneric add-method-gf-08 (x)))))
(remove-method gf method) (remove-method gf method)
(add-method gf2 method nil)) (add-method gf2 method nil))
program-error) program-error)
...@@ -62,10 +62,10 @@ ...@@ -62,10 +62,10 @@
(deftest add-method.error.7 (deftest add-method.error.7
(let* ((gf (eval '(defgeneric add-method-gf-09 (x y) (let* ((gf (eval '(defgeneric add-method-gf-09 (x y)
(:method ((x t) (y t)) 'a)))) (:method ((x t) (y t)) 'a))))
(method (find-method #'add-method-gf-09 nil (list (find-class t) (method (find-method #'add-method-gf-09 nil (list (find-class t)
(find-class t)))) (find-class t))))
(gf2 (eval '(defgeneric add-method-gf-10 (x &optional y))))) (gf2 (eval '(defgeneric add-method-gf-10 (x &optional y)))))
(remove-method gf method) (remove-method gf method)
(handler-case (handler-case
(add-method gf2 method) (add-method gf2 method)
...@@ -74,9 +74,9 @@ ...@@ -74,9 +74,9 @@
(deftest add-method.error.8 (deftest add-method.error.8
(let* ((gf (eval '(defgeneric add-method-gf-11 (x &key y) (let* ((gf (eval '(defgeneric add-method-gf-11 (x &key y)
(:method ((x t) &key y) 'a)))) (:method ((x t) &key y) 'a))))
(method (find-method #'add-method-gf-11 nil (list (find-class t)))) (method (find-method #'add-method-gf-11 nil (list (find-class t))))
(gf2 (eval '(defgeneric add-method-gf-12 (x))))) (gf2 (eval '(defgeneric add-method-gf-12 (x)))))
(remove-method gf method) (remove-method gf method)
(handler-case (handler-case
(add-method gf2 method) (add-method gf2 method)
...@@ -88,11 +88,11 @@ ...@@ -88,11 +88,11 @@
(deftest add-method.1 (deftest add-method.1
(let* ((gf (eval '(defgeneric add-method-gf-13 (x) (let* ((gf (eval '(defgeneric add-method-gf-13 (x)
(:method ((x integer)) 'a) (:method ((x integer)) 'a)
(:method ((x t)) 'b)))) (:method ((x t)) 'b))))
(method (find-method #'add-method-gf-13 (method (find-method #'add-method-gf-13
nil (list (find-class 'integer)))) nil (list (find-class 'integer))))
(gf2 (eval '(defgeneric add-method-gf-14 (x))))) (gf2 (eval '(defgeneric add-method-gf-14 (x)))))
(declare (type generic-function gf gf2)) (declare (type generic-function gf gf2))
(values (values
(funcall gf 0) (funcall gf 0)
...@@ -108,14 +108,14 @@ ...@@ -108,14 +108,14 @@
(deftest add-method.2 (deftest add-method.2
(let* ((specializers (list (find-class 'integer))) (let* ((specializers (list (find-class 'integer)))
(gf (eval '(defgeneric add-method-gf-15 (x) (gf (eval '(defgeneric add-method-gf-15 (x)
(:method ((x integer)) 'a) (:method ((x integer)) 'a)
(:method ((x t)) 'b)))) (:method ((x t)) 'b))))
(method (find-method gf nil specializers)) (method (find-method gf nil specializers))
(gf2 (eval '(defgeneric add-method-gf-16 (x) (gf2 (eval '(defgeneric add-method-gf-16 (x)
(:method ((x integer)) 'c) (:method ((x integer)) 'c)
(:method ((x t)) 'd)))) (:method ((x t)) 'd))))
(method2 (find-method gf2 nil specializers))) (method2 (find-method gf2 nil specializers)))
(declare (type generic-function gf gf2)) (declare (type generic-function gf gf2))
(values (values
(funcall gf 0) (funcall gf 0)
......
...@@ -55,35 +55,35 @@ ...@@ -55,35 +55,35 @@
(deftest adjoin.12 (deftest adjoin.12
(adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a) (adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a)
:test-not (complement #'equal)) :test-not (complement #'equal))
(aaa "AAA" "aaa" #\a)) (aaa "AAA" "aaa" #\a))
(deftest adjoin.14 (deftest adjoin.14
(adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a) (adjoin (copy-seq "aaa") '(aaa "AAA" "aaa" #\a)
:test #'equal :key #'identity) :test #'equal :key #'identity)
(aaa "AAA" "aaa" #\a)) (aaa "AAA" "aaa" #\a))
(deftest adjoin.15 (deftest adjoin.15