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
|
|
@ -79,6 +79,11 @@ try {
|
|||
$kini = NULL; # Should not fail, even though already deleted
|
||||
checkCount(0);
|
||||
|
||||
takeKlassUniquePtr(NULL);
|
||||
takeKlassUniquePtr(make_null());
|
||||
checkCount(0);
|
||||
|
||||
|
||||
# unique_ptr as output
|
||||
$k1 = makeKlassUniquePtr("first");
|
||||
$k2 = makeKlassUniquePtr("second");
|
||||
|
|
@ -92,4 +97,6 @@ check::equal($k2->getLabel(), "second", "proper label");
|
|||
$k2 = NULL;
|
||||
checkCount(0);
|
||||
|
||||
check::equal(makeNullUniquePtr(), NULL);
|
||||
|
||||
check::done();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue