Branch: Tag:

2014-12-04

2014-12-04 19:23:57 by Arne Goedeke <el@laramies.com>

mapping: fixed test case

The recently added cleanup of weak mappings during rehash makes
adding entries to a weak mapping semantically similar to running gc().
Using this analogy, the testcase before this commit assumed that

mapping a = set_weak_flag(([]), 1);
a[17] = ({ 17 });
gc();

results in a having one entry, which is clearly false.

6400:    return !sizeof (a) && !sizeof (b);    }]], 1);    test_any([[{ -  mapping a = ([17:({17})]); +  mapping a = ([17:17]);    set_weak_flag (a, 1);    for (int i = 0; i < 10; i++) a[class{}()] = i;    mapping b = a + ([]);