Add test of null shared pointers emitted from C++
This tests nulls emitted as pointers and values of shared pointers, created from null, from references, and from default constructors.
This commit is contained in:
parent
01995ec14f
commit
b08713f09f
2 changed files with 17 additions and 0 deletions
|
|
@ -168,6 +168,19 @@ class li_boost_shared_ptr_runme:
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
# test null pointers emitted from C++
|
||||
k = li_boost_shared_ptr.sp_pointer_null()
|
||||
if (li_boost_shared_ptr.smartpointertest(k) != None):
|
||||
raise RuntimeError("return was not null")
|
||||
|
||||
k = li_boost_shared_ptr.null_sp_pointer()
|
||||
if (li_boost_shared_ptr.smartpointertest(k) != None):
|
||||
raise RuntimeError("return was not null")
|
||||
|
||||
k = li_boost_shared_ptr.sp_value_null()
|
||||
if (li_boost_shared_ptr.smartpointertest(k) != None):
|
||||
raise RuntimeError("return was not null")
|
||||
|
||||
# $owner
|
||||
k = li_boost_shared_ptr.pointerownertest()
|
||||
val = k.getValue()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue