swig/Examples/test-suite/python/attributetest_runme.py
Marcelo Matus 800ebd6a78 added template test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5790 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-23 01:12:06 +00:00

37 lines
480 B
Python

import attributetest
aa = attributetest.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 = attributetest.Param_i(7)
if pi.value != 7:
raise RuntimeError
pi.value=3
if pi.value != 3:
raise RuntimeError