Merge branch 'tamuratak-fix_ruby_null_shared_ptr'
* tamuratak-fix_ruby_null_shared_ptr: [ruby] add a test. [ruby] use std::vector::back() method. [ruby] enable a test for null shared_ptr in containers. [ruby] add a test for null shared_ptr in containers. [ruby] treat null shared_ptr in std containers properly. Conflicts: Examples/test-suite/ruby/Makefile.in
This commit is contained in:
commit
ee44f9ba67
5 changed files with 81 additions and 2 deletions
|
|
@ -33,8 +33,9 @@ CPP_TEST_CASES = \
|
|||
|
||||
CPP11_TEST_CASES = \
|
||||
cpp11_hash_tables \
|
||||
cpp11_shared_ptr_upcast \
|
||||
cpp11_shared_ptr_const \
|
||||
cpp11_shared_ptr_nullptr_in_containers \
|
||||
cpp11_shared_ptr_upcast \
|
||||
|
||||
C_TEST_CASES += \
|
||||
li_cstring \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
require "cpp11_shared_ptr_nullptr_in_containers"
|
||||
|
||||
include Cpp11_shared_ptr_nullptr_in_containers
|
||||
|
||||
a = ret_vec_c_shared_ptr()
|
||||
raise unless a[0].get_m == 0
|
||||
raise unless a[1] == nil
|
||||
raise unless a[2].get_m == 2
|
||||
|
||||
a = ret_arg_vec([C.new(7), nil, C.new(9)])
|
||||
raise unless a[0].get_m == 7
|
||||
raise unless a[1] == nil
|
||||
raise unless a[2].get_m == 9
|
||||
|
||||
raise unless is_last_null([C.new(7), C.new(8), nil])
|
||||
raise if is_last_null([C.new(7), C.new(8)])
|
||||
Loading…
Add table
Add a link
Reference in a new issue