pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:8723:
test_eval_error([[(int)class { mixed cast() { return UNDEFINED; } }();]]) test_eval_error([[(string)class { mixed cast() { return UNDEFINED; } }();]]) test_eval_error([[(mapping)class { mixed cast() { return UNDEFINED; } }();]]) // testing @ test_equal(({1,2,3}),lambda(mixed ... x) { return x; }(@a())) test_equal("foo"/"",lambda(mixed ... x) { return x; }(@a())) test_any([[array a=({1,2,3}); return lambda(mixed ... x) { return x; }(@a) !=a]],1) test_any([[array z=({lambda(mixed x){return x;},17});return `()(@z);]],17)
+
// testing ++
+
test_any([[ class A(void|int i){}; object a = A(); a->i++; return undefinedp(a->i); ]], 0)
+
test_any([[ class A(void|int i){}; object a = A(); ++a->i; return undefinedp(a->i); ]], 0)
+
+
// testing --
+
test_any([[ class A(void|int i){}; object a = A(); a->i--; return undefinedp(a->i); ]], 0)
+
test_any([[ class A(void|int i){}; object a = A(); --a->i; return undefinedp(a->i); ]], 0)
+
// testing += test_any(int a=1; a+=10; return a,11) test_any_equal(mapping m=([]); m->x+=([]); return m->x, ([])) test_any_equal(mapping m=([]); m->x+=(<>); return m->x, (<>)) test_any_equal(mapping m=([]); m->x+=({}); return m->x, ({})) test_any_equal([[ array a = ({}); catch { a += Array.reduce(`+,({})); };