more tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5842 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
7ac0a7f883
commit
f4d82c2d62
2 changed files with 16 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
%module lib_std_vector
|
%module lib_std_vector
|
||||||
|
|
||||||
%include "std_vector.i"
|
%include "std_vector.i"
|
||||||
|
%include "cpointer.i"
|
||||||
|
%include "carrays.i"
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
@ -74,3 +76,6 @@ struct B : public A {
|
||||||
%}
|
%}
|
||||||
%template(VecB) std::vector<Test::B>;
|
%template(VecB) std::vector<Test::B>;
|
||||||
%template(VecA) std::vector<Test::A*>;
|
%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
|
b.val = 7
|
||||||
if va[3].f(1) != 8:
|
if va[3].f(1) != 8:
|
||||||
raise RuntimeError,"bad std::vector<A*> mapping"
|
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