Skip to content
Snippets Groups Projects
Commit 0db3763c authored by Arne Goedeke's avatar Arne Goedeke
Browse files

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.
parent 0320d1e3
Branches
Tags
No related merge requests found
......@@ -6400,7 +6400,7 @@ test_do(add_constant("blatinka");)
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 + ([]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment