pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:1:
-
test_true([["$Id: testsuite.in,v 1.
582
2003/01/
09
14:
29:28
grubba
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
583
2003/01/
11
03:
14:
26
mast
Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]]) cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals()) ]]); test_eq(1e1,10.0); test_eq(1E1,10.0);
pike.git/src/testsuite.in:4292:
void destroy() {add_constant("beltbent_oblivion", 1);} }; multiset(Foo) x = set_weak_flag ((<Foo()>), 1); gc(); int res = all_constants()->beltbent_oblivion; add_constant("beltbent_oblivion"); return res; }]], 1); test_any([[{
+
gc();
array x = set_weak_flag (({0}), 1); x[0] = x; multiset b = set_weak_flag ((<x>), 1); array a = ({17}); b[a] = 1; x = 0;
-
return gc()
+ gc()
>= 1;
+
return gc() >= 1;
}]], 1); test_any([[{
-
+
gc();
array a = set_weak_flag (({0, this_object()}), 1); a[0] = a; a = 0;
-
return gc()
+ gc()
>= 1;
+
return gc() >= 1;
}]], 1); test_any([[{
-
+
gc();
array y = set_weak_flag (({0}), 1), z = set_weak_flag (({y}), 1); y[0] = z; y = z = 0;
-
return gc()
+ gc()
>= 2;
+
return gc() >= 2;
}]], 1); test_any([[{ class Live { array a; object o = this_object(); void create() { a = set_weak_flag (({0}), 1); array b = set_weak_flag (({a}), 1); a[0] = b; } void destroy() { if (!arrayp(a) || !arrayp(a[0]) || a[0][0] != a) add_constant ("my_little_error", "GC garbed weak things too early.\n"); } };
-
+
gc();
object o = Live(); o = 0;
-
int res = gc()
+ gc()
>= 3;
+
int res = gc() >= 3;
if (all_constants()->my_little_error) error (all_constants()->my_little_error); return res; }]], 1); test_do([[{ class Live { Foo f; void destroy()
pike.git/src/testsuite.in:5227:
if (ndnested >= 4) dead_nested += ({dead_nested[1]->DeadNested3()}); } for (int i = 0; i < objs; i++) { int p = alloc_order[i]; if (p < nlive) live[p] = Live (p), create_order += ({p}); else p -= nlive, dead[p] = Dead (p), create_order += ({-p - 1}); } destruct_order = ({""}); // Using ({}) would alloc a new array in destructing(). setup(); live = dead = live_nested = dead_nested = 0;
-
int garbed = gc()
+
gc();
//
Second
gc
to
garb live object leftovers.
+
int garbed = gc()
;
+
gc();
//
To
garb live object leftovers.
destruct_order = destruct_order[1..]; if (!got_error && (got_error = sizeof (destruct_order) != nlive + nlnested)) werror ("\nGC should garb %d live objects, " "but took %d.\n", nlive + nlnested, sizeof (destruct_order)); if (!got_error && (got_error = garbed < 3 * (objs + nlnested + ndnested))) werror ("\nGC should garb at least %d things, " "but took only %d.\n", 3 * (objs + nlnested + ndnested), garbed); if (got_error) { werror ("Create order was: " + map (create_order, lambda (int i) {