pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2014-12-04
2014-12-04 19:22:57 by Arne Goedeke <el@laramies.com>
df160c2f1ee951e54bd1fa44718df62d9e8bc090 (
19
lines) (+
19
/-
0
)
[
Show
|
Annotate
]
Branch:
bill/master_archive_support
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]) ]])