mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Use the new CTU:IR1-NAMED-CALLS function instead because: * It's easy to assert that the called names EQUAL a list of symbols. * I plan to skip emitting FDEFNs for certain symbols (SB-KERNEL: and CL: etc) on x86-64 if not other architectures. Whether an fdefn exists would be unknown to the test (it only works for pseudostatic fdefns, e.g.) Alternatively, ASM-SEARCH may be helpful in searching for a string. In any event, scaning the code header will not be reliable. Additionally, try to express test expectations as positive assertions which is robust against accidentally failing to find something for a wrong reason like a flawed test. (inline signum was one such)
25 lines
1.1 KiB
Common Lisp
25 lines
1.1 KiB
Common Lisp
|
|
(with-test (:name :make-list-%make-list-not-called
|
|
:fails-on (:not :x86-64))
|
|
(assert (not (ctu:asm-search "%MAKE-LIST" #'make-list))))
|
|
|
|
(with-test (:name :copy-structure-efficient-case)
|
|
(assert (not (ctu:asm-search "ASH" #'copy-structure))))
|
|
|
|
;;; Make sure that we see the literal value of
|
|
;;; SB-UNICODE::+CHARACTER-MISC-DATABASE+
|
|
(with-test (:name :alphanumericp-is-inlined
|
|
:skipped-on (:not :sb-unicode))
|
|
(let ((code (sb-kernel:fun-code-header #'sb-impl::case-frob-capitalize-out)))
|
|
(loop for i from sb-vm:code-constants-offset below (sb-kernel:code-header-words code)
|
|
thereis (eq (sb-kernel:code-header-ref code i)
|
|
sb-unicode::+character-misc-database+))))
|
|
|
|
(with-test (:name :byte-bash-copier-mixup :skipped-on (or (:not :sb-devel)
|
|
:sb-devel-no-errors))
|
|
(let ((a (make-array 20 :element-type '(unsigned-byte 8)
|
|
:initial-element 0))
|
|
(b (make-array 5 :element-type '(unsigned-byte 32))))
|
|
;; Can't mix-and-match array element types.
|
|
(assert-error (sb-kernel:ub8-bash-copy a 0 b 0 5))))
|