Added new arrays_runme.rb tests
Added more tests for enums_runme.rb. Both showcase current swig problems. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9926 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8f6e08dcb5
commit
172b377bbe
2 changed files with 49 additions and 7 deletions
25
Examples/test-suite/ruby/arrays_runme.rb
Executable file
25
Examples/test-suite/ruby/arrays_runme.rb
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Test run of arrays.i
|
||||
#
|
||||
#
|
||||
|
||||
require 'swig_assert'
|
||||
require 'arrays'
|
||||
|
||||
include Arrays
|
||||
|
||||
a = SimpleStruct.new
|
||||
a.double_field = 2.0
|
||||
|
||||
b = SimpleStruct.new
|
||||
b.double_field = 1.0
|
||||
|
||||
# @bug: this is broken
|
||||
#
|
||||
# c = [a,b]
|
||||
# fn_taking_arrays(c)
|
||||
#
|
||||
# a = ArrayStruct.new
|
||||
# a.array_i[0] = 0
|
||||
#
|
||||
|
|
@ -1,17 +1,34 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Put description here
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# Runtime tests for enums.i
|
||||
#
|
||||
|
||||
require 'swig_assert'
|
||||
|
||||
require 'enums'
|
||||
|
||||
swig_assert_each_line( <<EOF )
|
||||
Enums::CSP_ITERATION_FWD == 0
|
||||
Enums::CSP_ITERATION_BWD == 11
|
||||
Enums::ABCDE == 0
|
||||
Enums::FGHJI == 1
|
||||
Enums.bar1(1)
|
||||
Enums.bar2(1)
|
||||
Enums.bar3(1)
|
||||
Enums.bar1(1)
|
||||
Enums::Boo == 0
|
||||
Enums::Hoo == 5
|
||||
Enums::Globalinstance1 == 0
|
||||
Enums::Globalinstance2 == 1
|
||||
Enums::Globalinstance3 == 30
|
||||
Enums::AnonEnum1 == 0
|
||||
Enums::AnonEnum2 == 100
|
||||
Enums::BAR1 == 0
|
||||
Enums::BAR2 == 1
|
||||
EOF
|
||||
|
||||
#
|
||||
# @bug:
|
||||
#
|
||||
# swig_assert_each_line( <<EOF )
|
||||
# Enums::IFoo::Phoo == 50
|
||||
# Enums::IFoo::Char == 'a'[0]
|
||||
# EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue