Added some runtime tests for ruby.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9693 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
928f12bd44
commit
5be075f16f
7 changed files with 255 additions and 0 deletions
40
Examples/test-suite/ruby/argout_runme.rb
Executable file
40
Examples/test-suite/ruby/argout_runme.rb
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/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?
|
||||
#
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue