[php] Update exception_memory_leak_runme.php
Test the new "return by value" case too.
This commit is contained in:
parent
9ab9c71623
commit
fefb231bd8
1 changed files with 9 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ trigger_internal_swig_exception("no problem", $a);
|
|||
check::equal(Foo::get_count(), 2, "Should have 2 Foo objects");
|
||||
check::equal(Foo::get_freearg_count(), 1, "freearg should have been used once");
|
||||
|
||||
// SWIG exception triggered and handled.
|
||||
// SWIG exception triggered and handled (return new object case).
|
||||
try {
|
||||
trigger_internal_swig_exception("null", $b);
|
||||
check::fail("Expected exception not thrown");
|
||||
|
|
@ -25,3 +25,11 @@ try {
|
|||
}
|
||||
check::equal(Foo::get_count(), 2, "Should have 2 Foo objects");
|
||||
check::equal(Foo::get_freearg_count(), 2, "freearg should have been used twice");
|
||||
|
||||
// SWIG exception triggered and handled (return by value case).
|
||||
try {
|
||||
trigger_internal_swig_exception("null");
|
||||
check::fail("Expected exception not thrown");
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
check::equal(Foo::get_count(), 2, "Should have 2 Foo objects");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue