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

# · Ruby · 26 lines · 11 code · 7 blank · 8 comment · 8 complexity · c76475a381b1677da54d41932dd5c0fa MD5 · raw file

  1. #!/usr/bin/env ruby
  2. #
  3. # Put description here
  4. #
  5. #
  6. #
  7. #
  8. #
  9. require 'swig_assert'
  10. require 'template_ns'
  11. include Template_ns
  12. p1 = Pairii.new(2, 3)
  13. p2 = Pairii.new(p1)
  14. raise RuntimeError if p2.first != 2
  15. raise RuntimeError if p2.second != 3
  16. p3 = Pairdd.new(3.5, 2.5)
  17. p4 = Pairdd.new(p3)
  18. raise RuntimeError if p4.first != 3.5
  19. raise RuntimeError if p4.second != 2.5