pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:5772:
gurka=([]); for(int e=0;e<x;e++) gurka[~e]=e; gurka[Sallad()]=-2; gurka[Tomat()]=-3; } } }(); ]])
+
test_any([[
+
mapping m = ([ "foo" : 1 ]);
+
class A {
+
int __hash() { return hash_value("foo"); }
+
int `==(mixed o) { return o == "foo"; }
+
};
+
return m[A()];
+
]], 1)
+
+
test_any([[
+
mapping m = ([ "foo" : 1 ]);
+
class A {
+
int __hash() { return hash_value("foo"); }
+
int `==(mixed o) { return o == "foo"; }
+
};
+
return sizeof(m - ([ A() : 1 ]));
+
]], 0)
+
test_equal([[ `+( ([1:2]) )]],[[ ([1:2]) ]]) test_false( `+( ([1:2]) ) == ([1:2]) ) test_equal([[ `+( ([1:2]), ([1:2]) )]],[[ ([1:2]) ]]) test_equal([[ `+( ([1:2]), ([1:2]), ([2:3,4:5]) )]],[[ ([1:2,2:3,4:5]) ]]) test_equal([[ `+( ([1:2]), ([1:2]), ([2:3,4:5]), ([6:7,1:2]) )]],[[ ([1:2,2:3,4:5,6:7]) ]]) test_equal([[ `+( ([1:2]), ([1:2]), ([2:3,4:5]), ([6:7,1:2]),([8:9]) )]],[[ ([1:2,2:3,4:5,6:7,8:9]) ]] ) test_any([[mapping m=([1:2,3:2]); return search(m,2,search(m,2))!=-1;]],1) test_any([[mapping m=([]); for(int e=0;e<1000;e++) m[e&3]+=({e}); return sizeof(m)==4 && sizeof(m[0])==250;]],1)