PageRenderTime 195ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/ruby/template_typedef_cplx4_runme.rb

#
Ruby | 46 lines | 19 code | 13 blank | 14 comment | 0 complexity | d0bedc3301e6cc50b52682a8808acb6d MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #!/usr/bin/env ruby
  2. #
  3. # Put description here
  4. #
  5. #
  6. #
  7. #
  8. #
  9. require 'swig_assert'
  10. require 'template_typedef_cplx4'
  11. include Template_typedef_cplx4
  12. #
  13. # this is OK
  14. #
  15. s = Sin.new
  16. s.get_base_value()
  17. s.get_value()
  18. s.get_arith_value()
  19. my_func_r(s)
  20. make_Multiplies_double_double_double_double(s,s)
  21. z = CSin.new
  22. z.get_base_value()
  23. z.get_value()
  24. z.get_arith_value()
  25. my_func_c(z)
  26. make_Multiplies_complex_complex_complex_complex(z,z)
  27. #
  28. # Here we fail
  29. #
  30. d = make_Identity_double()
  31. my_func_r(d)
  32. c = make_Identity_complex()
  33. my_func_c(c)