PageRenderTime 33ms CodeModel.GetById 31ms app.highlight 1ms 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
 1require 'varargs'
 2
 3if Varargs.test("Hello") != "Hello"
 4  raise RuntimeError, "Failed"
 5end
 6
 7f = Varargs::Foo.new("Greetings")
 8if f.str != "Greetings"
 9  raise RuntimeError, "Failed"
10end
11
12if f.test("Hello") != "Hello"
13  raise RuntimeError, "Failed"
14end
15