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 @@ 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue