[Scummvm-cvs-logs] SF.net SVN: scummvm: [31315] scummvm/trunk/test/common/hashmap.h

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Mar 30 04:39:21 CEST 2008


Revision: 31315
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31315&view=rev
Author:   lordhoto
Date:     2008-03-29 19:39:21 -0700 (Sat, 29 Mar 2008)

Log Message:
-----------
Add test for copying hashmaps.

Modified Paths:
--------------
    scummvm/trunk/test/common/hashmap.h

Modified: scummvm/trunk/test/common/hashmap.h
===================================================================
--- scummvm/trunk/test/common/hashmap.h	2008-03-30 02:36:23 UTC (rev 31314)
+++ scummvm/trunk/test/common/hashmap.h	2008-03-30 02:39:21 UTC (rev 31315)
@@ -70,6 +70,14 @@
 		container.clear();
 		TS_ASSERT( container.begin() == container.end() );
 	}
+	
+	void test_hash_map_copy( void )
+	{
+		Common::HashMap<int, int> map1, map2;
+		map1[323] = 32;
+		map2 = map1;
+		TS_ASSERT_EQUALS(map2[323], 32);
+	}
 
 	// TODO: Add test cases for iterators, find, ...
 };


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list