Add missing typedefs to std::vector + typedef corrections
Tests for std::vector of pointers added which check std::vector<T*>::const_reference and std::vector<T*>::reference usage which gave compilation errors in Python and Perl which had specialized these vectors incorrectly.
This commit is contained in:
parent
a47c2553f5
commit
e26f6bb4e2
18 changed files with 182 additions and 17 deletions
|
|
@ -173,3 +173,11 @@ if extractConstShort(vcs[0]) != 111:
|
|||
|
||||
if extractConstShort(vcs[1]) != 222:
|
||||
raise RuntimeError
|
||||
|
||||
for p in vcs[0:1]:
|
||||
if extractConstShort2(p) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
for p in vcs[1:2]:
|
||||
if extractConstShort2(p) != 222:
|
||||
raise RuntimeError
|
||||
|
|
|
|||
|
|
@ -4,12 +4,20 @@ def check(val1, val2):
|
|||
if val1 != val2:
|
||||
raise RuntimeError("Values are not the same %s %s" % (val1, val2))
|
||||
ip1 = makeIntPtr(11)
|
||||
ip2 = makeIntPtr(22)
|
||||
ip2 = makeIntPtr2(22)
|
||||
|
||||
vi = IntPtrVector((ip1, ip2))
|
||||
check(getValueFromVector(vi, 0), 11)
|
||||
check(getValueFromVector(vi, 1), 22)
|
||||
|
||||
check(getIntValue(vi[0]), 11)
|
||||
check(getIntValue(vi[1]), 22)
|
||||
check(getIntValue2(vi[0]), 11)
|
||||
check(getIntValue2(vi[1]), 22)
|
||||
|
||||
ipp = makeIntPtrPtr(vi[0])
|
||||
check(getIntValue3(ipp), 11) # Note: getIntValue3 takes int**
|
||||
|
||||
vA = APtrVector([makeA(33), makeA(34)])
|
||||
check(getVectorValueA(vA, 0), 33)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue