From 6f6eb234688891f6670e5b46a8d32c6be34a9588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Sat, 5 Oct 1996 05:17:48 +0200 Subject: [PATCH] tests for threads added Rev: src/testsuite.in:1.3 --- src/testsuite.in | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/testsuite.in b/src/testsuite.in index 212c45f415..35c70d9ac9 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -54,6 +54,30 @@ test_equal(sort(({4,3,2,1})),({1,2,3,4})) test_equal([[lambda() {string *a=({1,2,3,4}); sort(({4,3,2,1}),a); return a; }()]],[[({4,3,2,1})]] ) test_equal([[lambda() {string *a=({1,2,3,4}),*b=a+({}); sort(({4,3,2,1}),a,b); return b; }()]],[[({4,3,2,1})]] ) +cond([[all_efuns()->thread_create]], +[[ +// thread_create + test_do(thread_create(lambda() { })) + +// /precompiled/mutex + test_true(clone(Mutex)) + test_true(clone(Mutex)->lock()) + test_true(clone(Mutex)->trylock()) + +// /precompiled/condition + test_true(clone(Condition)) + test_do(clone(Condition)->signal()) + test_do(clone(Condition)->broadcast()) + +// /precompiled/fifo +test_any([[ +#include <fifo.h> +return 0; +]],0) + test_do(clone(Fifo)) + re +]]) + // m_delete test_equal(([1:1]),m_delete(a(),0)) -- GitLab