import source from 1.3.40
[external/swig.git] / Examples / test-suite / ruby / using_extend_runme.rb
1 #!/usr/bin/env ruby
2 #
3 # Put description here
4 #
5
6
7
8 #
9
10 require 'swig_assert'
11
12 require 'using_extend'
13
14 include Using_extend
15
16 f = FooBar.new
17 if f.blah(3) != 3
18   raise RuntimeError,"blah(int)"
19 end
20
21 if f.blah(3.5) != 3.5
22   raise RuntimeError,"blah(double)"
23 end
24
25 if f.blah("hello") != "hello"
26   raise RuntimeError,"blah(char *)"
27 end
28
29 if f.blah(3,4) != 7
30   raise RuntimeError,"blah(int,int)"
31 end
32
33 if f.blah(3.5,7.5) != (3.5+7.5)
34   raise RuntimeError,"blah(double,double)"
35 end
36