Test/fixes to handle NULL pointer for unique_ptr/auto_ptr
Also add missing unique_ptr tests for Lua and Racket.
This commit is contained in:
parent
ca9eebcb8d
commit
7934561874
32 changed files with 434 additions and 6 deletions
|
|
@ -116,6 +116,11 @@ end
|
|||
kini = nil
|
||||
checkCount(0)
|
||||
|
||||
Cpp11_std_unique_ptr::takeKlassUniquePtr(nil)
|
||||
Cpp11_std_unique_ptr::takeKlassUniquePtr(Cpp11_std_unique_ptr::make_null())
|
||||
checkCount(0)
|
||||
|
||||
|
||||
# unique_ptr as output
|
||||
k1 = Cpp11_std_unique_ptr::makeKlassUniquePtr("first")
|
||||
k2 = Cpp11_std_unique_ptr::makeKlassUniquePtr("second")
|
||||
|
|
@ -131,3 +136,4 @@ gc_check(1)
|
|||
k2 = nil
|
||||
gc_check(0)
|
||||
|
||||
swig_assert_equal_simple(Cpp11_std_unique_ptr::makeNullUniquePtr(), nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue