3 (5am:in-suite :qt.suite)
5 ;;; FIXME implement something sensibel and test
6 ;;; that it realy tests for races.
9 (defmacro parallel-test (&body body)
10 "Executes BODY concurrently by using threads and tests
11 wherther all tests are successfull."
12 (let ((threads (gensym))
14 `(let ((,threads nil))
16 (dotimes (,(gensym) 2)
17 (push (make-thread #'(lambda () ,@body))
19 (dolist (,thread ,threads)
20 (5am:is (eql (5am:results-status (join-thread ,thread))
24 (5am:test (bytearray-threads :depends-on bytearray)
25 "Concurrent qbytearray creation."
28 (5am:run 'bytearray))))
31 ;; FIXME this test does not work realibly
33 (5am:test (gc-object-threads :depends-on gc-object)
34 "Concurrent garbage collenction."
37 (5am:run 'gc-object))))