PageRenderTime 31ms CodeModel.GetById 5ms app.highlight 18ms RepoModel.GetById 3ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1require 'typedef_inherit'
 2
 3a = Typedef_inherit::Foo.new
 4b = Typedef_inherit::Bar.new
 5
 6x = Typedef_inherit.do_blah(a)
 7if x != "Foo::blah"
 8  puts "Whoa! Bad return #{x}"
 9end
10
11x = Typedef_inherit.do_blah(b)
12if x != "Bar::blah"
13  puts "Whoa! Bad return #{x}"
14end
15
16c = Typedef_inherit::Spam.new
17d = Typedef_inherit::Grok.new
18
19x = Typedef_inherit.do_blah2(c)
20if x != "Spam::blah"
21  puts "Whoa! Bad return #{x}"
22end
23
24x = Typedef_inherit.do_blah2(d)
25if x != "Grok::blah"
26  puts "Whoa! Bad return #{x}"
27end