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.
843
2008/07/
18
11
:
29
:
21
mast
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
844
2008/07/
24
09
:
54
:
00
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:4568:
]], 1) // /precompiled/condition test_true(Thread.Condition()) test_do(Thread.Condition()->signal()) 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) {
+
int val = q->read();
+
if (val != expect) return val + " != " + expect;
+
to_read--;
+
expect--;
+
} else {
+
q->write(to_write--);
+
}
+
}
+
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(); } ]]) test_any([[ // Test that a loop relinquishes the interpreter lock every now and then. int count, stop; Thread.thread_create (lambda() {while (!stop) count++;});
pike.git/src/testsuite.in:11420:
test_tests([[ array a() { return Tools.Testsuite.run_script ("]]SRCDIR[[/test_resolve.pike"); } ]]) // enum and typedef test_compile_error_any([[enum X {A, B}; enum(X) x;]])
+
test_compile_error_any([[enum {intern : extern};]])
// - modifiers, compile time type checks test_compile_any(class A {int v;} class B {inherit A; int v;}) test_compile_error_any(class A {int v;} class B {inherit A; float v;}) dnl test_compile_error_any(class A {int v;} class B {inherit A; mixed v;}) dnl test_compile_error_any(class A {mixed v;} class B {inherit A; int v;}) dnl test_compile_error_any(class A {public int v;} class B {inherit A; mixed v;}) dnl test_compile_error_any(class A { public { int v; } } class B {inherit A; mixed v;}) dnl test_compile_error_any(class A {public mixed v;} class B {inherit A; int v;})