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
|
|
@ -77,6 +77,11 @@ if not is_nullptr(kini):
|
|||
del kini # Should not fail, even though already deleted
|
||||
checkCount(0)
|
||||
|
||||
takeKlassUniquePtr(None)
|
||||
takeKlassUniquePtr(make_null())
|
||||
checkCount(0)
|
||||
|
||||
|
||||
# unique_ptr as output
|
||||
k1 = makeKlassUniquePtr("first")
|
||||
k2 = makeKlassUniquePtr("second")
|
||||
|
|
@ -90,3 +95,6 @@ if k2.getLabel() != "second":
|
|||
|
||||
del k2
|
||||
checkCount(0)
|
||||
|
||||
if (makeNullUniquePtr() != None):
|
||||
raise RuntimeError("null failure")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue