Fix scoping of forward class declarations nested within a class (for C++). Also fix %template and resolution of template parameters that are typedefs.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12764 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
931536594d
commit
7d038d4bd7
11 changed files with 442 additions and 54 deletions
|
|
@ -0,0 +1,37 @@
|
|||
from template_typemaps_typedef2 import *
|
||||
|
||||
m1 = MultimapIntA()
|
||||
|
||||
dummy_pair = m1.make_dummy_pair()
|
||||
val = m1.typemap_test(dummy_pair).val
|
||||
if val != 1234:
|
||||
raise RuntimeError, "typemaps not working"
|
||||
|
||||
m2 = MultimapAInt()
|
||||
|
||||
# TODO: typemaps and specializations not quite working as expected. T needs expanding, but at least the right typemap is being picked up.
|
||||
#dummy_pair = m2.make_dummy_pair()
|
||||
#val = m2.typemap_test(dummy_pair)
|
||||
|
||||
#print val
|
||||
#if val != 4321:
|
||||
# raise RuntimeError, "typemaps not working"
|
||||
|
||||
if typedef_test1(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test1 not working"
|
||||
|
||||
if typedef_test2(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test2 not working"
|
||||
|
||||
if typedef_test3(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test3 not working"
|
||||
|
||||
if typedef_test4(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test4 not working"
|
||||
|
||||
if typedef_test5(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test5 not working"
|
||||
|
||||
if typedef_test6(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test6 not working"
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
from template_typemaps_typedef import *
|
||||
|
||||
m1 = MultimapIntA()
|
||||
|
||||
dummy_pair = m1.make_dummy_pair()
|
||||
val = m1.typemap_test(dummy_pair).val
|
||||
if val != 1234:
|
||||
raise RuntimeError, "typemaps not working"
|
||||
|
||||
m2 = MultimapAInt()
|
||||
|
||||
# TODO: typemaps and specializations not quite working as expected. T needs expanding, but at least the right typemap is being picked up.
|
||||
#dummy_pair = m2.make_dummy_pair()
|
||||
#val = m2.typemap_test(dummy_pair)
|
||||
|
||||
#print val
|
||||
#if val != 4321:
|
||||
# raise RuntimeError, "typemaps not working"
|
||||
|
||||
if typedef_test1(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test1 not working"
|
||||
|
||||
if typedef_test2(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test2 not working"
|
||||
|
||||
if typedef_test3(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test3 not working"
|
||||
|
||||
if typedef_test4(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test4 not working"
|
||||
|
||||
if typedef_test5(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test5 not working"
|
||||
|
||||
if typedef_test6(dummy_pair).val != 1234:
|
||||
raise RuntimeError, "typedef_test6 not working"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue