Apply patch #3212624 fixing std::map Keys property.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12540 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-03-15 07:30:18 +00:00
commit 5f1c242f1a
3 changed files with 12 additions and 1 deletions

View file

@ -68,6 +68,7 @@ public class li_std_map_runme {
{
IList<string> keys = new List<string>(simap.Keys);
IList<int> values = new List<int>(simap.Values);
Dictionary<string, int> check = new Dictionary<string, int>();
if (keys.Count != collectionSize)
throw new Exception("Keys count test failed");
@ -78,6 +79,13 @@ public class li_std_map_runme {
{
if (simap[keys[i]] != values[i])
throw new Exception("Keys and values test failed for index " + i);
check.Add(keys[i], values[i]);
}
for (int i = 0; i < collectionSize; i++)
{
if (!check.ContainsKey(i.ToString()))
throw new Exception("Keys and Values ContainsKey test " + i + " failed");
}
}