mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
0.6.8.7: working regression tests for problems fixed by MNA megapatch
This commit is contained in:
parent
5eb97830ec
commit
e5ad09f34f
21
tests/compiler-1.impure.lisp
Normal file
21
tests/compiler-1.impure.lisp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
(cl:in-package :cl-user)
|
||||
|
||||
(declaim (optimize (debug 3) (speed 2) (space 1)))
|
||||
|
||||
;;; Until version 0.6.9 or so, SBCL's version of Python couldn't this
|
||||
;;; correctly, due to the bug patched by Rob MacLachlan on the
|
||||
;;; cmucl-imp list 2000-06-21, and apply to SBCL by Martin Atzmueller.
|
||||
;;; (The effectiveness of the test also depends on the implicit
|
||||
;;; function typing of Python (where DEFUN is like DECLAIM FTYPE),
|
||||
;;; which violates the ANSI spec, and should be fixed. Once that
|
||||
;;; unrelated bug is fixed, this code will no longer test the type
|
||||
;;; inference behavior it's intended to test.)
|
||||
(defun emptyvalues (&rest rest) (declare (ignore rest)) (values))
|
||||
(defstruct foo x y)
|
||||
(defun bar ()
|
||||
(let ((res (emptyvalues)))
|
||||
(unless (typep res 'foo)
|
||||
'expected-value)))
|
||||
(assert (eq (bar) 'expected-value))
|
||||
|
||||
(sb-ext:quit :unix-status 104) ; success
|
||||
20
tests/compiler.impure.lisp
Normal file
20
tests/compiler.impure.lisp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
;;;; This file is for compiler tests which have side effects (e.g.
|
||||
;;;; executing DEFUN) but which don't need any special side-effecting
|
||||
;;;; environmental stuff (e.g. DECLAIM of particular optimization
|
||||
;;;; settings). Similar tests which *do* expect special settings may
|
||||
;;;; be in files compiler-1.impure.lisp, compiler-2.impure.lisp, etc.
|
||||
|
||||
(cl:in-package :cl-user)
|
||||
|
||||
(load "assertoid.lisp")
|
||||
|
||||
;;; Old CMU CL code assumed that the names of "keyword" arguments are
|
||||
;;; necessarily self-evaluating symbols, but ANSI Common Lisp allows
|
||||
;;; them to be any symbols, not necessarily keywords, and thus not
|
||||
;;; necessarily self-evaluating. Make sure that this works.
|
||||
(defun newfangled-cons (&key ((left-thing x)) ((right-thing y)))
|
||||
(cons x y))
|
||||
(assert (equal (cons 1 2) (newfangled-cons 'right-thing 2 'left-thing 1)))
|
||||
|
||||
;;; success
|
||||
(quit :unix-status 104)
|
||||
|
|
@ -96,8 +96,5 @@
|
|||
:arg-seqs (*list-2* *list-2* *vector-30*)
|
||||
:arg-types (list list vector))
|
||||
|
||||
(print "returning successfully")
|
||||
(terpri)
|
||||
;;(sb-impl::flush-standard-output-streams)
|
||||
;;(finish-output)
|
||||
;;; success
|
||||
(quit :unix-status 104)
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@
|
|||
;;; versions, and a string like "0.6.5.12" is used for versions which
|
||||
;;; aren't released but correspond only to CVS tags or snapshots.
|
||||
|
||||
"0.6.8.6"
|
||||
"0.6.8.7"
|
||||
|
|
|
|||
Loading…
Reference in a new issue