Add threads to a test.

This commit is contained in:
Stas Boukarev 2023-01-29 18:38:55 +03:00
parent 6ce2c5fc08
commit be73d2e4f9

View file

@ -30,13 +30,23 @@
(/ 3 (- (expt 2 300)))
(1- (expt 2 sb-vm:n-word-bits))
(1- (expt 2 (1- sb-vm:n-word-bits)))
(- (expt 2 (1- sb-vm:n-word-bits)))))))
(- (expt 2 (1- sb-vm:n-word-bits))))))
#+(and slow sb-thread)
threads)
(macrolet ((thread (&body body)
(or #+(and slow sb-thread)
`(push (sb-thread:make-thread (lambda () ,@body))
threads)
`(progn ,@body))))
(loop
for logical in '(and #+slow or)
do
(loop
for op1 in ops
do
(let ((op1 op1)
(logical logical))
(thread
(loop
for op1-not in '(progn #+slow not)
do
@ -112,7 +122,9 @@
(unless (eql (funcall fun1 l n h)
(funcall fun2 l n h))
(error "~a" (list form
l n h)))))))))))))))))))))
l n h))))))))))))))))))))))
#+(and slow sb-thread)
(mapc #'sb-thread:join-thread threads)))
(with-test (:name :ranges-to-fixnump)
(let* ((ops '(< > <= >=))