Merge from trunk
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12976 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
commit
02d58e0125
99 changed files with 1847 additions and 418 deletions
24
Examples/test-suite/python/li_std_vector_enum_runme.py
Normal file
24
Examples/test-suite/python/li_std_vector_enum_runme.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import li_std_vector_enum
|
||||
|
||||
def check(a, b):
|
||||
if (a != b):
|
||||
raise RuntimeError("Not equal: ", a, b)
|
||||
|
||||
ev = li_std_vector_enum.EnumVector()
|
||||
|
||||
check(ev.nums[0], 10)
|
||||
check(ev.nums[1], 20)
|
||||
check(ev.nums[2], 30)
|
||||
|
||||
it = ev.nums.iterator()
|
||||
v = it.value()
|
||||
check(v, 10)
|
||||
it.next()
|
||||
v = it.value()
|
||||
check(v, 20)
|
||||
|
||||
expected = 10
|
||||
for val in ev.nums:
|
||||
check(val, expected)
|
||||
expected += 10
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue