import source from 1.3.40
[external/swig.git] / Examples / test-suite / ruby / using_inherit_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_inherit'
13
14 include Using_inherit
15
16 b = Bar.new
17 if b.test(3) != 3
18   raise RuntimeError,"Bar::test(int)"
19 end
20
21 if b.test(3.5) != 3.5
22   raise RuntimeError, "Bar::test(double)"
23 end
24
25 b = Bar2.new
26 if b.test(3) != 6
27   raise RuntimeError,"Bar2::test(int)"
28 end
29
30 if b.test(3.5) != 7.0
31   raise RuntimeError, "Bar2::test(double)"
32 end
33
34
35 b = Bar3.new
36 if b.test(3) != 6
37   raise RuntimeError,"Bar3::test(int)"
38 end
39
40 if b.test(3.5) != 7.0
41   raise RuntimeError, "Bar3::test(double)"
42 end
43
44
45 b = Bar4.new
46 if b.test(3) != 6
47   raise RuntimeError,"Bar4::test(int)"
48 end
49
50 if b.test(3.5) != 7.0
51   raise RuntimeError, "Bar4::test(double)"
52 end
53
54
55 b = Fred1.new
56 if b.test(3) != 3
57   raise RuntimeError,"Fred1::test(int)"
58 end
59
60 if b.test(3.5) != 7.0
61   raise RuntimeError, "Fred1::test(double)"
62 end
63
64
65 b = Fred2.new
66 if b.test(3) != 3
67   raise RuntimeError,"Fred2::test(int)"
68 end
69
70 if b.test(3.5) != 7.0
71   raise RuntimeError, "Fred2::test(double)"
72 end
73
74