X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fthreads.pure.lisp;h=ce0df2d9261d33c92f3d80e8242f609c978fe4f5;hb=19180214a7fd95ab467020469b7182f5ac62bcde;hp=26c70f1d17500e96af642235e7b69602b33bc9d4;hpb=4c81c652cdc32faefee1bccb84c3c9a7854e3edd;p=sbcl.git diff --git a/tests/threads.pure.lisp b/tests/threads.pure.lisp index 26c70f1..ce0df2d 100644 --- a/tests/threads.pure.lisp +++ b/tests/threads.pure.lisp @@ -53,7 +53,7 @@ (with-test (:name without-interrupts+condition-wait :fails-on :sb-lutex - :skipped-on '(not :sb-thread)) + :skipped-on '(not :sb-thread)) (let* ((lock (make-mutex)) (queue (make-waitqueue)) (thread (make-thread (lambda () @@ -481,3 +481,28 @@ (sb-thread:thread-deadlock () :deadlock)))) (assert (eq :ok (join-thread t1))))) + +#+sb-thread +(with-test (:name :pass-arguments-to-thread) + (assert (= 3 (join-thread (make-thread #'+ :arguments '(1 2)))))) + +#+sb-thread +(with-test (:name :pass-atom-to-thread) + (assert (= 1/2 (join-thread (make-thread #'/ :arguments 2))))) + +#+sb-thread +(with-test (:name :pass-nil-to-thread) + (assert (= 1 (join-thread (make-thread #'* :arguments '()))))) + +#+sb-thread +(with-test (:name :pass-nothing-to-thread) + (assert (= 1 (join-thread (make-thread #'*))))) + +#+sb-thread +(with-test (:name :pass-improper-list-to-thread) + (multiple-value-bind (value error) + (ignore-errors (make-thread #'+ :arguments '(1 . 1))) + (when value + (join-thread value)) + (assert (and (null value) + error))))