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

@ -53,8 +53,8 @@ checkCount(0);
kin = Klass("KlassInput");
exception_thrown = false;
notowned = get_not_owned_ptr(kin);
try
notowned = get_not_owned_ptr(kin);
takeKlassAutoPtr(notowned);
catch e
if (isempty(strfind(e.message, "cannot release ownership as memory is not owned")))
@ -65,6 +65,7 @@ end_try_catch
if (!exception_thrown)
error("Should have thrown 'Cannot release ownership as memory is not owned' error");
endif
checkCount(1);
clear kin;
checkCount(0);