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
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue