add 'attribute' macros for python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5777 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
483d8b4367
commit
e83c226741
3 changed files with 198 additions and 0 deletions
27
SWIG/Examples/test-suite/python/attributetest_runme.py
Normal file
27
SWIG/Examples/test-suite/python/attributetest_runme.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import attributetest
|
||||
|
||||
aa = attributetest.A(1,2,3)
|
||||
|
||||
if aa.a != 1:
|
||||
raise RuntimeError
|
||||
aa.a = 3
|
||||
if aa.a != 3:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
if aa.b != 2:
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue