more tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5842 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a0e5e53f64
commit
f62bf7a2e7
2 changed files with 16 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
|||
%module lib_std_vector
|
||||
|
||||
%include "std_vector.i"
|
||||
%include "cpointer.i"
|
||||
%include "carrays.i"
|
||||
|
||||
%{
|
||||
#include <algorithm>
|
||||
|
|
@ -74,3 +76,6 @@ struct B : public A {
|
|||
%}
|
||||
%template(VecB) std::vector<Test::B>;
|
||||
%template(VecA) std::vector<Test::A*>;
|
||||
|
||||
%pointer_class(int,PtrInt)
|
||||
%array_functions(int,ArrInt)
|
||||
|
|
|
|||
|
|
@ -33,3 +33,14 @@ if va[0].f(1) != 6:
|
|||
b.val = 7
|
||||
if va[3].f(1) != 8:
|
||||
raise RuntimeError,"bad std::vector<A*> mapping"
|
||||
|
||||
|
||||
ip = PtrInt()
|
||||
ap = new_ArrInt(10)
|
||||
|
||||
vi = IntPtrVector((ip,ap,None))
|
||||
|
||||
if vi[1] != ap:
|
||||
raise RuntimeError,"bad std::vector<int*> mapping"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue