pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:1:
START_MARKER
-
test_true([["$Id: testsuite.in,v 1.
844
2008/07/24
09
:
54
:
00
grubba Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
845
2008/07/24
11
:
56
:
20
grubba Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]]) test_compile_any([[#pike 7.4]]) test_compile_any([[#pike 7.0]]) test_compile_any([[#pike 0.6]]) cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals())
pike.git/src/testsuite.in:4573:
test_do(Thread.Condition()->broadcast()) test_true(objectp(Thread.Fifo())) test_true(objectp(Thread.Queue())) // Check that Thread.Queue works on the basic level. test_any([[ Thread.Queue q = Thread.Queue(); int to_write = 100000; int to_read = 0;
-
int expect = to_write;
+
while (to_write + to_read) {
-
if (
random(
to_write
+
to_read)
<
to_read) {
+
if (
!
to_write
||
random(4
*
to_read)
)
{
int val = q->read();
-
if (val !=
expect
) return val + " != " +
expect
;
+
if (val !=
(to_write + to_read
)
)
+
return val + " != " +
(to_write + to_read)
;
to_read--;
-
expect--;
+
} else { q->write(to_write--);
-
+
to_read++;
} } return 0; ]], 0) test_any([[object o=Thread.Queue(); thread_create(lambda(object f) { for(int e=0;e<10000;e++) f->write(random(4711)); f->write(-1); },o); int tmp=0; while(o->read() != -1) tmp++; return tmp;]],10000) test_any([[object o=Thread.Fifo(); thread_create(lambda(object f) { for(int e=0;e<10000;e++) f->write(random(4711)); f->write(-1); },o); int tmp=0; while(o->read() != -1) tmp++; return tmp;]],10000) dnl this will crash pike on out-of-address-space-related errors dnl test_any([[ catch { allocate(10000,thread_create)(lambda() { sleep(1); })->wait(); } ]])