Commit cb6beec3 authored by camm's avatar camm
Browse files

Backport minimal ansi-test patches from HEAD to enable running of the random tester

parent fb346e77
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -1426,3 +1426,32 @@ the condition to go uncaught if it cannot be classified."
      (unsigned-byte 32) float short-float
      single-float double-float long-float
      nil character base-char symbol boolean null))

(defun random-partition (n p)
  "Partition n into p numbers, each >= 1.  Return list of numbers."
  (assert (<= 1 p))
  #|
  (cond
   ((= p 1) (list n))
   ((< n p) (make-list p :initial-element 1))
   (t
    (let ((n1 (1+ (random (floor n p)))))
      (cons n1 (random-partition (- n n1) (1- p)))))))
  |#
  (cond
   ((= p 1) (list n))
   ((= n 0) (make-list p :initial-element 0))
   (t (let* ((r (random p))
	     (n1 (random (1+ n))))
	(cond
	 ((= r 0)
	  (cons n1 (random-partition (- n n1) (1- p))))
	 ((= r (1- p))
	  (append (random-partition (- n n1) (1- p)) (list n1)))
	 (t
	  (let* ((n2 (random (1+ (- n n1))))
		 (n3 (- n n1 n2)))
	    (append (random-partition n2 r)
		    (list n1)
		    (random-partition n3 (- p 1 r))))))))))
+3 −0
Original line number Diff line number Diff line
@@ -2145,6 +2145,9 @@
		 *cl-standard-generic-function-symbols*
		 '(declare)))))

(defparameter *cl-function-or-accessor-symbols*
  (append *cl-function-symbols* *cl-accessor-symbols*))

(defparameter *cl-non-variable-constant-symbols*
  (set-difference
   *cl-symbols*
+22 −0
Original line number Diff line number Diff line
@@ -6,6 +6,28 @@
(load "cl-test-package.lsp")
(in-package :cl-test)
(load "universe.lsp")
(compile-and-load "random-aux.lsp")
(compile-and-load "ansi-aux.lsp")
;;; (unless (probe-file "ansi-aux.o") (compile-file "ansi-aux.lsp"))
;;; (load "ansi-aux.o")

(load "cl-symbol-names.lsp")
;(load "notes.lsp")

(setq *compile-verbose* nil
      *compile-print* nil
      *load-verbose* nil)

#+cmu (setq ext:*gc-verbose* nil)

#+gcl (setq compiler:*suppress-compiler-notes* t
            compiler:*suppress-compiler-warnings* t
            compiler:*compile-verbose* nil
            compiler:*compile-print* nil)

#+lispworks (setq compiler::*compiler-warnings* nil)

#+ecl (setq c:*suppress-compiler-warnings* t
            c:*suppress-compiler-notes* t)

#+clisp (setq custom::*warn-on-floating-point-contagion* nil)