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 @@ end
kini = nil -- Should not fail, even though already deleted
checkCount(0)
li_std_auto_ptr.takeKlassAutoPtr(nil);
li_std_auto_ptr.takeKlassAutoPtr(li_std_auto_ptr.make_null());
checkCount(0);
-- auto_ptr as output
k1 = li_std_auto_ptr.makeKlassAutoPtr("first")
k2 = li_std_auto_ptr.makeKlassAutoPtr("second")
@ -91,3 +96,5 @@ end
k2 = nil
checkCount(0)
assert(li_std_auto_ptr.makeNullAutoPtr() == nil)