/tags/rel-1-3-15/SWIG/Examples/test-suite/ruby/inherit_missing_runme.rb

# · Ruby · 20 lines · 16 code · 4 blank · 0 comment · 6 complexity · 7037aacfa7eead65e3683173e9d742fb MD5 · raw file

  1. require 'inherit_missing'
  2. a = Inherit_missing.new_Foo()
  3. b = Inherit_missing::Bar.new
  4. c = Inherit_missing::Spam.new
  5. x = Inherit_missing.do_blah(a)
  6. if x != "Foo::blah"
  7. puts "Whoa! Bad return #{x}"
  8. end
  9. x = Inherit_missing.do_blah(b)
  10. if x != "Bar::blah"
  11. puts "Whoa! Bad return #{x}"
  12. end
  13. x = Inherit_missing.do_blah(c)
  14. if x != "Spam::blah"
  15. puts "Whoa! Bad return #{x}"
  16. end