std::unique_ptr std::auto_ptr tidyup

Add docs on additional support
Additional testing for invalid usage for parameter inputs
This commit is contained in:
William S Fulton 2022-07-19 08:57:47 +01:00
commit 1b63af0f2c
10 changed files with 107 additions and 22 deletions

View file

@ -33,6 +33,8 @@ exception_thrown = False
try:
s = takeKlassUniquePtr(kin)
except RuntimeError as e:
if "cannot release ownership as memory is not owned" not in str(e):
raise RuntimeError("incorrect exception message");
exception_thrown = True
if not exception_thrown:
raise RuntimeError("double usage of takeKlassUniquePtr should have been an error")