Add std_auto_ptr.i defining typemaps for returning std::auto_ptr<>.
These typemaps are currently defined for C#, Java and Python only and the tests are provided only for these languages. Also add a brief description of the new header to the documentation.
This commit is contained in:
parent
9d3fc0069c
commit
ed28725a15
10 changed files with 282 additions and 0 deletions
17
Examples/test-suite/python/li_std_auto_ptr_runme.py
Normal file
17
Examples/test-suite/python/li_std_auto_ptr_runme.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from li_std_auto_ptr import *
|
||||
|
||||
k1 = makeKlassAutoPtr("first")
|
||||
k2 = makeKlassAutoPtr("second")
|
||||
if Klass.getTotal_count() != 2:
|
||||
raise "number of objects should be 2"
|
||||
|
||||
del k1
|
||||
if Klass.getTotal_count() != 1:
|
||||
raise "number of objects should be 1"
|
||||
|
||||
if k2.getLabel() != "second":
|
||||
raise "wrong object label"
|
||||
|
||||
del k2
|
||||
if Klass.getTotal_count() != 0:
|
||||
raise "no objects should be left"
|
||||
Loading…
Add table
Add a link
Reference in a new issue