pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2014-08-28
2014-08-28 13:00:40 by Martin Nilsson <nilsson@opera.com>
28d2beba0e7cc6eb0dd006912cb69d05b9e995c4 (
9
lines) (+
9
/-
0
)
[
Show
|
Annotate
]
Branch:
8.0
Fixed direct call of cast.
4700:
[[ ({ 1,4,6 }) ]]) // map tests
+
test_eq(map("abc", `+, 1), "bcd")
+
test_equal(map((["a":1,"b":2]), `+, 1), (["a":2,"b":3]))
+
test_equal(map((<1,2,3>), `+, 1), (<2,3,4>))
+
test_any_equal(class A { constant a=1; constant b=2; }; return map(A, `+ ,1);, (["a":2,"b":3]))
+
test_any_equal(class A { protected mixed cast(string t) { if(t=="mapping") return (["a":1,"b":2]);}}; return map(A(), `+, 1);, (["a":2,"b":3]))
+
test_any_equal(class A { protected mixed cast(string t) { if(t=="array") return ({1,2,3});}}; return map(A(), `+, 1);, ({2,3,4}))
+
test_any_equal(class A { protected mixed cast(string t) { if(t=="multiset") return (<1,2,3>);}}; return map(A(), `+, 1);, (<2,3,4>))
test_any_equal(array a = ({({1,0,0}),({1,1,0}),({0,1,1})}); return map(a,`[],1);, ({0,1,1})) test_any_equal(array a = ({({1,0,0}),({1,1,0}),({0,1,1})}); map(a,`[]=,1,0); return a;,
4759:
({(["a":1]),(["a":1])}), (["a":1,"b":"d"])}))
+
test_any_equal([[ /* This test tests a wild program pointer in the object o. The bug can trig a coredump in a later test. */