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 @@ public class cpp11_std_unique_ptr_runme {
|
|||
|
||||
using (Klass kin = new Klass("KlassInput")) {
|
||||
bool exception_thrown = false;
|
||||
Klass notowned = cpp11_std_unique_ptr.get_not_owned_ptr(kin);
|
||||
try {
|
||||
Klass notowned = cpp11_std_unique_ptr.get_not_owned_ptr(kin);
|
||||
cpp11_std_unique_ptr.takeKlassUniquePtr(notowned);
|
||||
} catch (ApplicationException e) {
|
||||
if (!e.Message.Contains("Cannot release ownership as memory is not owned"))
|
||||
|
|
@ -63,6 +63,7 @@ public class cpp11_std_unique_ptr_runme {
|
|||
}
|
||||
if (!exception_thrown)
|
||||
throw new ApplicationException("Should have thrown 'Cannot release ownership as memory is not owned' error");
|
||||
checkCount(1);
|
||||
}
|
||||
checkCount(0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue