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.
604
2003/02/19
00
:
52
:
33
marcus
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
605
2003/02/19
12
:
13
:
51
grubba
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:4131:
test_any([[{ class Dead {object o;}; class Live {object o; void destroy() {}}; object o = Live(); o->o = Dead(); o->o->o = o; gc(); o = 0; return gc() > 0; }]], 1) test_any_equal([[{ class Live {object o; void destroy() {}}; array a = set_weak_flag(({Live()}), 1);
-
gc(); return a;
+
gc();
+
return
set_weak_flag(
a
, 0)
;
}]], ({0})) test_any_equal([[{ class Live {object o; void destroy() {}}; multiset l = set_weak_flag((<Live()>), 1);
-
gc(); return l;
+
gc();
+
return
set_weak_flag(
l
, 0)
;
}]], (<>)) test_any_equal([[{ class Live {object o; void destroy() {}}; mapping m = set_weak_flag(([0: Live()]), 1);
-
gc(); return m;
+
gc();
+
return
set_weak_flag(
m
, 0)
;
}]], ([])) test_any_equal([[{ class Live {object o; void destroy() {}}; mapping m = set_weak_flag(([Live(): 0]), 1);
-
gc(); return m;
+
gc();
+
return
set_weak_flag(
m
, 0)
;
}]], ([])) test_any_equal([[{ array a = set_weak_flag(({4711, 0x54325827a124*0x12348795482485425}), 1);
-
gc(); return a;
+
gc();
+
return
set_weak_flag(
a
, 0)
;
}]], ({4711, 0x54325827a124*0x12348795482485425})) test_any_equal([[{ object o = class Live { array g; array a = ({17}); void create() {g = ({this_object()});} void destroy() {all_constants()->kablutt = a;} }(); o = 0;
pike.git/src/testsuite.in:4513:
object o = class{}(); mapping a = set_weak_flag (([o: class{}()]), 0); destruct (o); gc(); return !sizeof (a); }]], 1); test_any_equal([[{ array a = set_weak_flag (({1, "foo", 3.14}), 1); gc();
-
return a;
+
return
set_weak_flag(
a
, 0)
;
}]], ({1, "foo", 3.14})); test_any_equal([[{ multiset a = set_weak_flag ((<1, "foo", 3.14>), 1); gc();
-
return a;
+
return
set_weak_flag(
a
, 0)
;
}]], (<1, "foo", 3.14>)); test_any_equal([[{ mapping a = set_weak_flag (([1: 1, "foo": "foo", 3.14: 3.14]), 1); gc();
-
return a;
+
return
set_weak_flag(
a
, 0)
;
}]], ([1: 1, "foo": "foo", 3.14: 3.14])); test_do([[{ object f = class { object o = class {}(); array a = set_weak_flag (({o}), 1); object this = this_object(); void create() {destruct (o);} }();
pike.git/src/testsuite.in:5030:
test_true([[ random(0x7ffffffff)+1 ]]) test_true([[ sqrt(0x7fffffff)+1 ]]) test_true([[ sqrt(0x7ffffffff)+1 ]]) test_true([[ catch { destruct((mixed)0x4783647824687234628462); } ]]) test_any_equal([[ array a = ({4711, 0x54325827a124*0x12348795482485425}); set_weak_flag (a, 1); gc();
-
return a;
+
return
set_weak_flag(
a
, 0)
;
]], [[ ({4711, 0x54325827a124*0x12348795482485425}) ]]) test_any_equal([[ mapping m = ([ 4711: 0x54325827a124*0x12348795482485425, 0x54325827124*0x1234879548a2485425: 1174, ]); set_weak_flag (m, 1); gc();
-
return m;
+
return
set_weak_flag(
m
, 0)
;
]], [[ ([ 4711: 0x54325827a124*0x12348795482485425, 0x54325827124*0x1234879548a2485425: 1174, ]) ]]) ]]) cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]], [[ test_any([[int a=2147483648; a=a+17; return a]], 2147483665) test_any([[int a=2147483648; a=a-17; return a]], 2147483631)
pike.git/src/testsuite.in:5382:
test_equal([[ array_sscanf("02 00 DC 00 0B","%{%x%*[\0-/:-@]%}")[0] ]], [[ ({ ({2}), ({0}), ({220}),({0}), ({11}) }) ]]) test_equal([[ array_sscanf("\51726\30212\66610\30131", "%*[ \t]%s")[0] ]], [[ "\51726\30212\66610\30131" ]]) test_equal([[ array_sscanf("hej","%s") ]], [[ ({ "hej" }) ]]) test_equal([[ array_sscanf("hej","%s%n") ]], [[ ({ "hej", 3 }) ]]) test_eval_error([[ function f=array_sscanf; f("hej","%s% ") ]])
-
test_equal([[ array_sscanf("\x304b\x3066\x3044\x308a\x3087\x3046\x308a", "%[^\x3042\x3044\x3046\x3048\x304a]") ]],
+
test_equal([[ array_sscanf("\x304b\x3066\x3044\x308a\x3087\x3046\x308a", "%[^\x3042\x3044\x3046\x3048\x304a]")
[0]
]],
[[ "\x304b\x3066" ]]) test_any([[ class Bar { string sum = ""; void bar(string s) { sum += s; } string foo()