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:
parent
72fc8be46c
commit
5f1c242f1a
3 changed files with 12 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue