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

@ -87,6 +87,11 @@ void main() {
} // dispose should not fail, even though already deleted
checkCount(0);
takeKlassUniquePtr(null);
takeKlassUniquePtr(make_null());
checkCount(0);
// unique_ptr as output
Klass k1 = makeKlassUniquePtr("first");
if (k1.getLabel() != "first")
@ -103,4 +108,7 @@ void main() {
k2.dispose();
checkCount(0);
if (makeNullUniquePtr() !is null)
throw new Exception("null failure");
}