From 90bf3de2d66a6605fad7f6a050fae6d277d15f56 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 28 May 2008 18:32:05 +0000 Subject: Decrement _nele when erasing an element from hashmap, and add a test-case for this bug. svn-id: r32343 --- test/common/hashmap.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/common/hashmap.h b/test/common/hashmap.h index 883e965065..5aa609bc00 100644 --- a/test/common/hashmap.h +++ b/test/common/hashmap.h @@ -37,6 +37,9 @@ class HashMapTestSuite : public CxxTest::TestSuite TS_ASSERT( !container.contains(1) ); container[1] = 42; TS_ASSERT( container.contains(1) ); + container.erase(0); + container.erase(1); + TS_ASSERT( container.empty() ); } void test_lookup( void ) -- cgit v1.2.3