Test/fixes to handle NULL pointer for unique_ptr/auto_ptr
Also add missing unique_ptr tests for Lua and Racket.
This commit is contained in:
parent
ca9eebcb8d
commit
7934561874
32 changed files with 434 additions and 6 deletions
|
|
@ -87,6 +87,11 @@ public class cpp11_std_unique_ptr_runme {
|
|||
} // Dispose should not fail, even though already deleted
|
||||
checkCount(0);
|
||||
|
||||
cpp11_std_unique_ptr.takeKlassUniquePtr(null);
|
||||
cpp11_std_unique_ptr.takeKlassUniquePtr(cpp11_std_unique_ptr.make_null());
|
||||
checkCount(0);
|
||||
|
||||
|
||||
// unique_ptr as output
|
||||
Klass k1 = cpp11_std_unique_ptr.makeKlassUniquePtr("first");
|
||||
if (k1.getLabel() != "first")
|
||||
|
|
@ -110,5 +115,8 @@ public class cpp11_std_unique_ptr_runme {
|
|||
k2.Dispose();
|
||||
k2 = null;
|
||||
checkCount(0);
|
||||
|
||||
if (cpp11_std_unique_ptr.makeNullUniquePtr() != null)
|
||||
throw new Exception("null failure");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue