/trunk/Examples/test-suite/ruby/using_extend_runme.rb
Ruby | 36 lines | 19 code | 9 blank | 8 comment | 10 complexity | e6e1c4cabe350a8e792345e4454961cd MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- #!/usr/bin/env ruby
- #
- # Put description here
- #
- #
- #
- #
- #
- require 'swig_assert'
- require 'using_extend'
- include Using_extend
- f = FooBar.new
- if f.blah(3) != 3
- raise RuntimeError,"blah(int)"
- end
- if f.blah(3.5) != 3.5
- raise RuntimeError,"blah(double)"
- end
- if f.blah("hello") != "hello"
- raise RuntimeError,"blah(char *)"
- end
- if f.blah(3,4) != 7
- raise RuntimeError,"blah(int,int)"
- end
- if f.blah(3.5,7.5) != (3.5+7.5)
- raise RuntimeError,"blah(double,double)"
- end