*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4460 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1c8d2d0f66
commit
87d2016a27
7 changed files with 85 additions and 0 deletions
4
SWIG/Examples/test-suite/ruby/using1_runme.rb
Normal file
4
SWIG/Examples/test-suite/ruby/using1_runme.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
require 'using1'
|
||||
|
||||
raise RuntimeError unless Using1.spam(37) == 37
|
||||
|
||||
4
SWIG/Examples/test-suite/ruby/using2_runme.rb
Normal file
4
SWIG/Examples/test-suite/ruby/using2_runme.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
require 'using2'
|
||||
|
||||
raise RuntimeError unless Using2.spam(37) == 37
|
||||
|
||||
17
SWIG/Examples/test-suite/ruby/using_composition_runme.rb
Normal file
17
SWIG/Examples/test-suite/ruby/using_composition_runme.rb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
require 'using_composition'
|
||||
|
||||
include Using_composition
|
||||
|
||||
f = FooBar.new
|
||||
if f.blah(3) != 3
|
||||
raise RuntimeError,"blah(int)"
|
||||
end
|
||||
|
||||
if f.blah(3.5) != 3.5
|
||||
raise RuntimeError,"blah(double)"
|
||||
end
|
||||
|
||||
if f.blah("hello") != "hello"
|
||||
raise RuntimeError,"blah(char *)"
|
||||
end
|
||||
|
||||
25
SWIG/Examples/test-suite/ruby/using_extend_runme.rb
Normal file
25
SWIG/Examples/test-suite/ruby/using_extend_runme.rb
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
require 'using_extend'
|
||||
|
||||
include Using_extend
|
||||
|
||||
f = FooBar.new
|
||||
if f.blah(3) != 3
|
||||
raise RuntimeError,"blah(int)"
|
||||
end
|
||||
|
||||
if f.blah(3.5) != 3.5
|
||||
raise RuntimeError,"blah(double)"
|
||||
end
|
||||
|
||||
if f.blah("hello") != "hello"
|
||||
raise RuntimeError,"blah(char *)"
|
||||
end
|
||||
|
||||
if f.blah(3,4) != 7
|
||||
raise RuntimeError,"blah(int,int)"
|
||||
end
|
||||
|
||||
if f.blah(3.5,7.5) != (3.5+7.5)
|
||||
raise RuntimeError,"blah(double,double)"
|
||||
end
|
||||
|
||||
13
SWIG/Examples/test-suite/ruby/using_inherit_runme.rb
Normal file
13
SWIG/Examples/test-suite/ruby/using_inherit_runme.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
require 'using_inherit'
|
||||
|
||||
include Using_inherit
|
||||
|
||||
b = Bar.new
|
||||
if b.test(3) != 3
|
||||
raise RuntimeError,"test(int)"
|
||||
end
|
||||
|
||||
if b.test(3.5) != 3.5
|
||||
raise RuntimeError, "test(double)"
|
||||
end
|
||||
|
||||
11
SWIG/Examples/test-suite/ruby/using_private_runme.rb
Normal file
11
SWIG/Examples/test-suite/ruby/using_private_runme.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
require 'using_private'
|
||||
|
||||
include Using_private
|
||||
|
||||
f = FooBar.new
|
||||
f.x = 3
|
||||
|
||||
if f.blah(4) != 4
|
||||
raise RuntimeError, "blah(int)"
|
||||
end
|
||||
|
||||
11
SWIG/Examples/test-suite/ruby/using_protected_runme.rb
Normal file
11
SWIG/Examples/test-suite/ruby/using_protected_runme.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
require 'using_protected'
|
||||
|
||||
include Using_protected
|
||||
|
||||
f = FooBar.new
|
||||
f.x = 3
|
||||
|
||||
if f.blah(4) != 4
|
||||
raise RuntimeError, "blah(int)"
|
||||
end
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue