std::unique_ptr std::auto_ptr tidyup
Add docs on additional support Additional testing for invalid usage for parameter inputs
This commit is contained in:
parent
db5e37a1d7
commit
1b63af0f2c
10 changed files with 107 additions and 22 deletions
|
|
@ -73,7 +73,10 @@ exception_thrown = false
|
|||
begin
|
||||
notowned = Cpp11_std_unique_ptr::get_not_owned_ptr(kin)
|
||||
Cpp11_std_unique_ptr::takeKlassUniquePtr(notowned)
|
||||
rescue RuntimeError
|
||||
rescue RuntimeError => e
|
||||
if (!e.to_s.include? "cannot release ownership as memory is not owned")
|
||||
raise RuntimeError, "incorrect exception message"
|
||||
end
|
||||
exception_thrown = true
|
||||
end
|
||||
if (!exception_thrown)
|
||||
|
|
|
|||
|
|
@ -74,6 +74,9 @@ begin
|
|||
notowned = Li_std_auto_ptr::get_not_owned_ptr(kin)
|
||||
Li_std_auto_ptr::takeKlassAutoPtr(notowned)
|
||||
rescue RuntimeError
|
||||
if (!e.to_s.include? "cannot release ownership as memory is not owned")
|
||||
raise RuntimeError, "incorrect exception message"
|
||||
end
|
||||
exception_thrown = true
|
||||
end
|
||||
if (!exception_thrown)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue