Added testcase for function objects.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
523817e4ee
commit
e949fa3cc7
3 changed files with 34 additions and 2 deletions
12
Examples/test-suite/python/cpp0x_function_objects_runme.py
Normal file
12
Examples/test-suite/python/cpp0x_function_objects_runme.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import cpp0x_function_objects
|
||||
import sys
|
||||
|
||||
t = cpp0x_function_objects.Test()
|
||||
if t.value != 0:
|
||||
raise RuntimeError,"Runtime cpp0x_function_objects failed. t.value should be 0, but is", t.value
|
||||
|
||||
t(1,2) # sets value
|
||||
|
||||
if t.value != 10:
|
||||
raise RuntimeError,"Runtime cpp0x_function_objects failed. t.value not changed - should be 10, but is", t.value
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue