auto_ptr and unique_ptr test tweaks
This commit is contained in:
parent
fe17296eb4
commit
a741c7dbcf
14 changed files with 30 additions and 16 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue