sbcl.sbcl/tests/alientype.pure-cload.lisp
Douglas Katzman aa645e5c32 Actually fix alien-fun-type-hashset
Doesn't work to hash-cons if the leaves aren't hash-consed
2022-12-21 13:20:33 -05:00

27 lines
1,007 B
Common Lisp

(defparameter *bool8type*
#.(sb-alien-internals:parse-alien-type '(boolean 8) nil))
(defparameter *s13type*
#.(sb-alien-internals:parse-alien-type '(signed 13) nil))
(defparameter *cstrtype*
(sb-alien-internals:parse-alien-type
'(c-string :external-format :church-latin ; we don't validate this?
:element-type base-char
:not-null t)
nil))
(with-test (:name :hash-cons-alien-type-atoms)
;; restored as the right metatype
(assert (sb-alien-internals:alien-boolean-type-p *bool8type*))
(assert (eq *bool8type* ; and re-parses to the identical object
(sb-alien-internals:parse-alien-type '(boolean 8) nil)))
(assert (eq *s13type*
(sb-alien-internals:parse-alien-type '(signed 13) nil)))
(assert (eq *cstrtype*
(sb-alien-internals:parse-alien-type
'(c-string :external-format :church-latin
:element-type base-char
:not-null t)
nil))))