Typemap matching rules enhancement for non-default typemaps. Previously all qualifiers were stripped in one step, now they are stripped one at a time starting with the left most qualifier.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12007 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
58a7e2c3d6
commit
efd200ffe2
10 changed files with 398 additions and 38 deletions
54
Examples/test-suite/python/typemap_qualifier_strip_runme.py
Normal file
54
Examples/test-suite/python/typemap_qualifier_strip_runme.py
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import typemap_qualifier_strip
|
||||
|
||||
val = typemap_qualifier_strip.create_int(111)
|
||||
if typemap_qualifier_strip.testA1(val) != 1234:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testA2(val) != 1234:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testA3(val) != 1234:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testA4(val) != 1234:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
if typemap_qualifier_strip.testB1(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testB2(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testB3(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testB4(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
if typemap_qualifier_strip.testC1(val) != 5678:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testC2(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testC3(val) != 5678:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testC4(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
if typemap_qualifier_strip.testD1(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testD2(val) != 3456:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testD3(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
if typemap_qualifier_strip.testD4(val) != 111:
|
||||
raise RuntimeError
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue