Add out of bounds Ruby std::vector and std::array access testing
Also fix swig_assert_equal to work with nil as an expected input
This commit is contained in:
parent
fe09f05beb
commit
97b129de6c
3 changed files with 14 additions and 0 deletions
|
|
@ -82,6 +82,11 @@ iv[1,3] = [6,7,8,9]
|
|||
|
||||
iv = IntVector.new([1,2,3,4])
|
||||
|
||||
swig_assert_equal(iv[0], 1, binding)
|
||||
swig_assert_equal(iv[3], 4, binding)
|
||||
swig_assert_equal(iv[4], nil, binding)
|
||||
swig_assert_equal(iv[-5], nil, binding)
|
||||
|
||||
iv[-1] = 9
|
||||
iv[-4] = 6
|
||||
swig_assert_equal(iv.to_s, '6239', binding)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue