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:
William S Fulton 2022-08-31 08:35:55 +01:00
commit 7934561874
32 changed files with 434 additions and 6 deletions

View file

@ -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")