/trunk/Examples/test-suite/python/template_typedef_runme.py
Python | 46 lines | 32 code | 11 blank | 3 comment | 7 complexity | 8507ffef6846deba9c44e536f9260d64 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- from template_typedef import *
- d = make_Identity_float()
- c = make_Identity_reald()
- try:
- a = d.this
- a = c.this
- except:
- raise RuntimeError
- try:
- e = make_Multiplies_float_float_float_float(d, d)
- a = e.this
- except:
- print e, "is not an instance"
- raise RuntimeError
- try:
- f = make_Multiplies_reald_reald_reald_reald(c, c)
- a = f.this
- except:
- print f, "is not an instance"
- raise RuntimeError
- try:
- g = make_Multiplies_float_float_reald_reald(d, c)
- a = g.this
- except:
- print g, "is not an instance"
- raise RuntimeError
- # the old large format
- if not SWIG_TypeQuery("vfncs::ArithUnaryFunction<vfncs::arith_traits<float,double>::argument_type,vfncs::arith_traits<float,double >::result_type > *"):
- raise RuntimeError
- # the reduced format
- if not SWIG_TypeQuery("vfncs::ArithUnaryFunction<double,double> *"):
- raise RuntimeError
- # this is a bad name
- if SWIG_TypeQuery("vfncs::ArithUnaryFunction<double,doublex> *"):
- raise RuntimeError