sbcl.sbcl/tests/boundp.pure-cload.lisp
Douglas Katzman 2fe8c7d13f Rearrange emit-symeval
* Don't call tn-value on a load-time-value TN
* Kill comment implying [RIP-n] addressing mode can reach fixedobj space
  from immobile code using a rel32 operand.
2025-05-18 18:29:20 -04:00

14 lines
440 B
Common Lisp

;;; the test is mostly whether this file can be compiled or not
(defun b () (boundp (load-time-value (intern "DERP"))))
(defun v () (symbol-value (load-time-value (intern "DERP"))))
(test-util:with-test (:name :boundp-l-t-v-constant)
(assert (not (b)))
(progv '(derp) '(yes)
(assert (b))
(assert (eq (v) 'yes)))
(progv '(derp) '() (assert (not (b))))
(setf (symbol-value 'derp) 'ok)
(assert (b))
(assert (eq (v) 'ok)))