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

@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.3 (in progress)
===========================
2011-03-15: wsfulton
[C#] Apply patch #3212624 fixing std::map Keys property.
2011-03-14: olly
[PHP] Fix handling of overloaded methods/functions where some
return void and others don't - whether this worked or not depended

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");
}
}

View file

@ -269,7 +269,7 @@
const key_type& get_next_key(std::map< K, T >::iterator *swigiterator) {
std::map< K, T >::iterator iter = *swigiterator;
swigiterator++;
(*swigiterator)++;
return (*iter).first;
}