pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2012-11-04
2012-11-04 17:59:56 by Arne Goedeke <el@laramies.com>
3b2cd42b0addb578812fe70460ae4dba7969d244 (
19
lines) (+
19
/-
0
)
[
Show
|
Annotate
]
Branch:
7.9
mapping: remove overoptimization when looking up objects
5779:
]])
+
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]) ]])