new tests for string and directors+containers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5772 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a672ff61ef
commit
c8d7e4d971
4 changed files with 189 additions and 0 deletions
27
SWIG/Examples/test-suite/python/lib_std_string_runme.py
Normal file
27
SWIG/Examples/test-suite/python/lib_std_string_runme.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import lib_std_string
|
||||
|
||||
x="hello"
|
||||
|
||||
if lib_std_string.test_value(x) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
|
||||
if lib_std_string.test_const_reference(x) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
|
||||
|
||||
s = lib_std_string.string("he")
|
||||
s.append("llo")
|
||||
|
||||
if lib_std_string.test_value(s) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
|
||||
if lib_std_string.test_const_reference(s) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
|
||||
a = lib_std_string.A("hello")
|
||||
|
||||
if lib_std_string.test_value(a) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
|
||||
if lib_std_string.test_const_reference(a) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
Loading…
Add table
Add a link
Reference in a new issue