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:
Matevz Jekovec 2009-07-18 22:13:40 +00:00
commit e949fa3cc7
3 changed files with 34 additions and 2 deletions

View 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