swig/Examples/test-suite/ruby/argout_runme.rb
Gonzalo Garramuno 5be075f16f Added some runtime tests for ruby.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9693 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-28 15:52:50 +00:00

40 lines
737 B
Ruby
Executable file

#!/usr/bin/env ruby
#
# Put script description here.
#
# Author::
# Copyright::
# License:: Ruby
#
require 'swig_assert'
require 'argout'
include Argout
t = new_intp
intp_assign(t, 5)
v = incp(t)
swig_assert( v == 5, "incp - v == 5 was #{v}")
val = intp_value(t)
swig_assert( val == 6, "incp - intp_value(t) == 6 was #{val}")
t = new_intp
intp_assign(t, 5)
v = incr(t)
swig_assert( v == 5, "incr - v == 5 was #{v}")
val = intp_value(t)
swig_assert( val == 6, "incr - intp_value(t) == 6 was #{val}")
t = new_intp
intp_assign(t, 5)
v = inctr(t)
swig_assert( v == 5, "inctr - v == 5 was #{v}")
val = intp_value(t)
swig_assert( val == 6, "inctr - intp_value(t) == 6 was #{val}")
#
# @todo: how to use voidhandle and handle?
#