PageRenderTime 36ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/test-suite/ruby/varargs_runme.rb

#
Ruby | 15 lines | 11 code | 4 blank | 0 comment | 6 complexity | dcf198f533cd7759f05c8b07b02229e9 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. require 'varargs'
  2. if Varargs.test("Hello") != "Hello"
  3. raise RuntimeError, "Failed"
  4. end
  5. f = Varargs::Foo.new("Greetings")
  6. if f.str != "Greetings"
  7. raise RuntimeError, "Failed"
  8. end
  9. if f.test("Hello") != "Hello"
  10. raise RuntimeError, "Failed"
  11. end