/trunk/Examples/test-suite/ruby/apply_signed_char_runme.rb
Ruby | 45 lines | 28 code | 9 blank | 8 comment | 4 complexity | e4b8847dc34e8c94d6a715fc8531afee MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- #!/usr/bin/env ruby
- #
- # Put script description here.
- #
- #
- #
- #
- #
- require 'swig_assert'
- require 'apply_signed_char'
- include Apply_signed_char
- ['CharValFunction', 'CCharValFunction', 'CCharRefFunction'].each do |m|
- [ 3, -3 ].each do |v|
- val = send( m, v )
- swig_assert( "v == val", binding, "for #{m}")
- end
- end
- { 'globalchar' => -109,
- 'globalconstchar' => -110,
- }.each do |k,v|
- val = Apply_signed_char.send( k )
- swig_assert( "v == val", binding, "for #{k}")
- end
- a = DirectorTest.new
- ['CharValFunction', 'CCharValFunction', 'CCharRefFunction'].each do |m|
- [ 3, -3 ].each do |v|
- val = a.send( m, v )
- swig_assert( "v == val", binding, "for DirectorTest.#{m}")
- end
- end
- { 'memberchar' => -111,
- 'memberconstchar' => -112,
- }.each do |k,v|
- val = a.send( k )
- swig_assert( "v == val", binding, "for #{k}")
- end