move attribute.i to the typemap library, now is usable from all the languages
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7717 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
25e3e4dee8
commit
8be1b7a07c
12 changed files with 251 additions and 159 deletions
37
Examples/test-suite/python/li_attribute_runme.py
Normal file
37
Examples/test-suite/python/li_attribute_runme.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import li_attribute
|
||||
|
||||
aa = li_attribute.A(1,2,3)
|
||||
|
||||
if aa.a != 1:
|
||||
raise RuntimeError
|
||||
aa.a = 3
|
||||
if aa.a != 3:
|
||||
print aa.a
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
if aa.b != 2:
|
||||
print aa.b
|
||||
raise RuntimeError
|
||||
aa.b = 5
|
||||
if aa.b != 5:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
|
||||
if aa.d != aa.b:
|
||||
raise RuntimeError
|
||||
|
||||
if aa.c != 3:
|
||||
raise RuntimeError
|
||||
#aa.c = 5
|
||||
#if aa.c != 3:
|
||||
# raise RuntimeError
|
||||
|
||||
pi = li_attribute.Param_i(7)
|
||||
if pi.value != 7:
|
||||
raise RuntimeError
|
||||
|
||||
pi.value=3
|
||||
if pi.value != 3:
|
||||
raise RuntimeError
|
||||
Loading…
Add table
Add a link
Reference in a new issue