summaryrefslogtreecommitdiff
path: root/Examples/test-suite/ruby/typedef_inherit_runme.rb
blob: 029b80c708abd81e6f5b5b5f4b1eb95b38e2cd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env ruby
#
# Put description here
#
# 
# 
# 
#

require 'swig_assert'

require 'typedef_inherit'

a = Typedef_inherit::Foo.new
b = Typedef_inherit::Bar.new

x = Typedef_inherit.do_blah(a)
if x != "Foo::blah"
  puts "Whoa! Bad return #{x}"
end

x = Typedef_inherit.do_blah(b)
if x != "Bar::blah"
  puts "Whoa! Bad return #{x}"
end

c = Typedef_inherit::Spam.new
d = Typedef_inherit::Grok.new

x = Typedef_inherit.do_blah2(c)
if x != "Spam::blah"
  puts "Whoa! Bad return #{x}"
end

x = Typedef_inherit.do_blah2(d)
if x != "Grok::blah"
  puts "Whoa! Bad return #{x}"
end