PageRenderTime 44ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/test-suite/ruby/template_typedef_cplx3_runme.rb

#
Ruby | 35 lines | 18 code | 11 blank | 6 comment | 0 complexity | abb9f354c29e34f09f5c53b37cd3ae0e MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. require 'template_typedef_cplx3'
  2. include Template_typedef_cplx3
  3. #
  4. # this is OK
  5. #
  6. s = Sin.new
  7. s.get_base_value()
  8. s.get_value()
  9. s.get_arith_value()
  10. my_func_r(s)
  11. make_Multiplies_double_double_double_double(s,s)
  12. z = CSin.new
  13. z.get_base_value()
  14. z.get_value()
  15. z.get_arith_value()
  16. my_func_c(z)
  17. make_Multiplies_complex_complex_complex_complex(z,z)
  18. #
  19. # Here we fail
  20. #
  21. d = make_Identity_double()
  22. my_func_r(d)
  23. c = make_Identity_complex()
  24. my_func_c(c)