/tags/ttn-post-libtool-1-4-3-upgrade/SWIG/Examples/test-suite/ruby/typedef_inherit_runme.rb
# · Ruby · 27 lines · 21 code · 6 blank · 0 comment · 8 complexity · 64f0436e457682929a784448e1106203 MD5 · raw file
- 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