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

@ -90,8 +90,8 @@ checkCount 0
Klass kin "KlassInput"
set exception_thrown 0
set notowned [get_not_owned_ptr kin]
if [ catch {
set notowned [get_not_owned_ptr kin]
takeKlassUniquePtr notowned
} ] {
set exception_thrown 1
@ -99,6 +99,7 @@ if [ catch {
if {!$exception_thrown} {
error "Should have thrown 'Cannot release ownership as memory is not owned' error"
}
checkCount 1
kin -delete
checkCount 0

View file

@ -61,8 +61,8 @@ checkCount 0
Klass kin "KlassInput"
set exception_thrown 0
set notowned [get_not_owned_ptr kin]
if [ catch {
set notowned [get_not_owned_ptr kin]
takeKlassAutoPtr notowned
} ] {
set exception_thrown 1
@ -70,6 +70,7 @@ if [ catch {
if {!$exception_thrown} {
error "Should have thrown 'Cannot release ownership as memory is not owned' error"
}
checkCount 1
kin -delete
checkCount 0