[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-commits
Subject:    [Sbcl-commits] master: Fix tests.
From:       stassats via Sbcl-commits <sbcl-commits () lists ! sourceforge ! net>
Date:       2022-09-29 14:39:55
Message-ID: 1664462395.449086.1440 () sfp-scm-1 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]

The branch "master" has been updated in SBCL:
       via  d5b4158aba1844f3f560525888f18fbd9c560b8b (commit)
      from  b41578e269c95de568b52b98f46c2b045db2fa85 (commit)

- Log -----------------------------------------------------------------
commit d5b4158aba1844f3f560525888f18fbd9c560b8b
Author: Stas Boukarev <stassats@gmail.com>
Date:   Thu Sep 29 17:36:14 2022 +0300

    Fix tests.
---
 tests/compiler.pure.lisp         | 4 ++--
 tests/defglobal.pure.lisp        | 1 +
 tests/defstruct.impure.lisp      | 2 --
 tests/x86-64-codegen.impure.lisp | 2 ++
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp
index 0a1adfd57..452173df3 100644
--- a/tests/compiler.pure.lisp
+++ b/tests/compiler.pure.lisp
@@ -2465,7 +2465,7 @@
 
 ;;; Dead unbound variable (bug 412)
 (with-test (:name (compile :dead-unbound :bug-412))
-  (checked-compile-and-assert (:optimize :safe :allow-warnings t)
+  (checked-compile-and-assert (:optimize '(:safety 3) :allow-warnings t)
       '(lambda ()
         #:unbound
         42)
@@ -4070,7 +4070,7 @@
                                         :allow-warnings t)))))
 
 (with-test (:name (compile :bug-722734))
-  (checked-compile-and-assert (:allow-warnings t :optimize :safe)
+  (checked-compile-and-assert (:allow-warnings t :optimize '(:safety 3))
       '(lambda ()
          (eql (make-array 6)
               (list unbound-variable-1 unbound-variable-2)))
diff --git a/tests/defglobal.pure.lisp b/tests/defglobal.pure.lisp
index 7579c49de..f1ba94628 100644
--- a/tests/defglobal.pure.lisp
+++ b/tests/defglobal.pure.lisp
@@ -122,6 +122,7 @@
 (declaim (global this-is-unbound))
 (with-test (:name :dead-unbound-global)
   (let ((fun (checked-compile '(lambda ()
+                                (declare (optimize safety))
                                 this-is-unbound
                                 42))))
     (assert-error (funcall fun) unbound-variable)))
diff --git a/tests/defstruct.impure.lisp b/tests/defstruct.impure.lisp
index a24704637..666a83932 100644
--- a/tests/defstruct.impure.lisp
+++ b/tests/defstruct.impure.lisp
@@ -607,8 +607,6 @@
   (slot *bug210*))
 ;;; Because of bug 210, this assertion used to fail.
 (assert (typep (nth-value 1 (ignore-errors (bug210a))) 'unbound-variable))
-;;; Even with bug 210, these assertions succeeded.
-(assert (typep (nth-value 1 (ignore-errors *bug210*)) 'unbound-variable))
 (assert (typep (nth-value 1 (ignore-errors (make-bug210b))) 'unbound-variable))
 
 ;;; In sbcl-0.7.8.53, DEFSTRUCT blew up in non-toplevel contexts
diff --git a/tests/x86-64-codegen.impure.lisp b/tests/x86-64-codegen.impure.lisp
index 8cc936171..0e3d01467 100644
--- a/tests/x86-64-codegen.impure.lisp
+++ b/tests/x86-64-codegen.impure.lisp
@@ -714,6 +714,7 @@
                           (search "CMP DWORD PTR" line)))))
 
 (with-test (:name :thread-local-unbound)
+  (declare (optimize safety))
   (let ((c (nth-value 1 (ignore-errors sb-c::*compilation*))))
     (assert (eq (cell-error-name c) 'sb-c::*compilation*))))
 
@@ -976,6 +977,7 @@
   ;; Previously there would have been one from BOUNDP and one from SYMBOL-VALUE.
   (let ((lines (disassembly-lines
                 '(lambda ()
+                  (declare (optimize safety))
                   (if (boundp 'sb-c::*compilation*) sb-c::*compilation*) '(hi)))))
     (dolist (line lines)
       (assert (not (search "ERROR" line))))

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL


_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic