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

@ -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();