auto_ptr and unique_ptr test tweaks

This commit is contained in:
William S Fulton 2022-08-03 20:32:58 +01:00
commit a741c7dbcf
14 changed files with 30 additions and 16 deletions

View file

@ -43,13 +43,14 @@ checkCount(0)
kin = Klass("KlassInput")
exception_thrown = False
notowned = get_not_owned_ptr(kin)
try:
notowned = get_not_owned_ptr(kin)
takeKlassUniquePtr(notowned)
except RuntimeError as e:
exception_thrown = True
if not exception_thrown:
raise RuntimeError("Should have thrown 'Cannot release ownership as memory is not owned' error")
checkCount(1)
del kin
checkCount(0)