Browse Source

MemTracker is a new thing, better than the shitty previous thing.

undefined
Benjamin ‘Touky’ Huet Sam Hocevar <sam@hocevar.net> 9 years ago
parent
commit
cdc3328f3a
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      src/t/base/map.cpp

+ 17
- 0
src/t/base/map.cpp View File

@@ -74,6 +74,23 @@ lolunit_declare_fixture(MapTest)
m.remove(a[i]);
}

lolunit_declare_test(MapRemoveString)
{
map<String, uint64_t> m;
array<String> a;

for (int i = 0; i < 20; i++)
{
a << String::Printf("test_str_%i", i);
m[a.Last()] = -1;
}
for (int i = 0; i < a.Count(); i++)
m[a[i]] = i;
a.Shuffle();
for (int i = 0; i < a.Count(); i++)
m.remove(a[i]);
}

lolunit_declare_test(MapRemoveBug)
{
map<uint64_t, uint64_t> m;


Loading…
Cancel
Save