Fix std::vector of const pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11704 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4b2ced5095
commit
132376bade
5 changed files with 67 additions and 2 deletions
|
|
@ -154,3 +154,23 @@ if extractInt(vi[0]) != 11:
|
|||
if extractInt(vi[1]) != 22:
|
||||
raise RuntimeError
|
||||
|
||||
# vector const pointer checks
|
||||
csp = makeConstShortPtr(111)
|
||||
|
||||
error = 0
|
||||
try:
|
||||
vcs = ConstShortPtrVector((csp, dp)) # check vector<const unsigned short *> does not accept double * element
|
||||
error = 1
|
||||
except:
|
||||
pass
|
||||
|
||||
if error:
|
||||
raise RuntimeError
|
||||
|
||||
vcs = ConstShortPtrVector((csp, makeConstShortPtr(222)))
|
||||
if extractConstShort(vcs[0]) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
if extractConstShort(vcs[1]) != 222:
|
||||
raise RuntimeError
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue