From 5b83808fd1d43aecd5844fd6ed26c8532b4fc3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Tue, 9 Sep 1997 18:24:36 -0700 Subject: [PATCH] test 120 fixed Rev: src/testsuite.in:1.52 --- src/testsuite.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/testsuite.in b/src/testsuite.in index 0d68b10583..8b788964a6 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -test_true([["$Id: testsuite.in,v 1.51 1997/09/09 03:36:13 hubbe Exp $"]]) +test_true([["$Id: testsuite.in,v 1.52 1997/09/10 01:24:36 hubbe Exp $"]]) test_eq(1e1,10.0) test_eq(1E1,10.0) test_eq(1e+1,10.0) @@ -163,7 +163,13 @@ cond([[all_constants()->thread_create]], test_do(add_constant("_tmp_mutex")) test_any([[ object m = Thread.Mutex(); object k = m->lock(); thread_create(lambda(object k){ sleep(10); }, k);if (catch{m->lock(); return 0;}) { return 1; } return 0; ]],1) test_any([[ mixed *data=({0,Thread.Mutex(),Thread.Mutex(),0}); data[3]=data[2]->lock(); thread_create(lambda(mixed *data) {object o=data[1]->lock(); destruct(data[3]); sleep(10); data[0]=1; destruct(o); },data); object l=data[2]->lock(1); object ll=data[1]->lock(); return data[0]; ]],1) - test_any([[mixed *data=({1, Thread.Mutex()}); for(int e=0;e<3;e++) thread_create(lambda(mixed *data) { for(int e=0;e<1000;e++) { object o=data[1]->lock(); data[0]*=2; for(int d=0;d<5;d++) { data[0]--; data[0]*=2; } data[0]--; destruct(o); }}, data); return data[0];]],1) + test_any([[ +mixed *data=({1, Thread.Mutex(), Thread.Condition(), 0}); +for(int e=0;e<3;e++) { data[3]++; thread_create(lambda(mixed *data) { + for(int e=0;e<1000;e++) { object o=data[1]->lock(); data[0]*=2; + for(int d=0;d<5;d++) { data[0]--; data[0]*=2; } data[0]--; destruct(o); } + data[3]--; data[2]->signal();}, data);} + while(data[3]) data[2]->wait(); return data[0];]],1) // /precompiled/condition test_true(Thread.Condition()) -- GitLab