3 function compare($type, $c, $d) {
4 echo "--- $type ----\n";
11 function test_veclike($name, $c, $d) {
12 // we take partly filled containers as an arguments and mutate them before
13 // passing them to compare, so that interning and hhbbc can't make them be
14 // backed by the same underlying storage; if that happened the assumptions
15 // of this test would be violated
18 compare($name, $c, $d);
21 function test_dictlike($name, $c, $d) {
22 // we take partly filled containers as an arguments and mutate them before
23 // passing them to compare, so that interning and hhbbc can't make them be
24 // backed by the same underlying storage; if that happened the assumptions
25 // of this test would be violated
28 compare($name, $c, $d);
32 test_veclike('Packed Array', varray
[1], varray
[1]);
33 test_dictlike('Mixed Array', darray
['a' => 1], darray
['a' => 1]);
35 test_veclike('Vec', vec
[1], vec
[1]);
36 test_dictlike('Dict', dict
['a' => 1], dict
['a' => 1]);
38 test_veclike('Vector', Vector
{1}, Vector
{1});
39 test_dictlike('Map', Map
{'a' => 1}, Map
{'a' => 1});
44 function main_equals_same_vs_container_with_nan() {