diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index ff8bcbdfc..b59dd1e36 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -507,6 +507,7 @@ CPP_TEST_CASES += \ typemap_numinputs \ typemap_template \ typemap_template_parm_typedef \ + typemap_template_typedef \ typemap_out_optimal \ typemap_qualifier_strip \ typemap_variables \ diff --git a/Examples/test-suite/typemap_template_typedef.i b/Examples/test-suite/typemap_template_typedef.i index c84416ef9..6605ec711 100644 --- a/Examples/test-suite/typemap_template_typedef.i +++ b/Examples/test-suite/typemap_template_typedef.i @@ -9,14 +9,14 @@ %apply int TMAP77 { XXX::Long cc } %inline %{ -typedef int Integer; +typedef int MyInteger; template struct XXX { #ifdef SWIG // In swig-3.0.12 'Long aa' was actually stored as 'long aa' in typemap table instead of 'XXX::Long aa' %apply int TMAP55 { Long aa } %apply int TMAP66 { XXX::Long bb } -%apply int TMAP88 { XXX::Long dd } +%apply int TMAP88 { XXX::Long dd } #endif typedef long Long; long aa1(long aa) { return aa; } @@ -30,7 +30,7 @@ template struct XXX { #ifdef SWIG %clear Long aa; %clear XXX::Long bb; -%clear XXX::Long dd; +%clear XXX::Long dd; #endif long aa3(Long aa) { return aa; } long bb3(Long bb) { return bb; } @@ -39,7 +39,7 @@ template struct XXX { }; %} -%template(XXXInt) XXX; +%template(XXXInt) XXX; %clear XXX::Long cc; @@ -50,17 +50,17 @@ template struct XXX { long bb2(long bb) { return bb; } long cc1(XXX::Long cc) { return cc; } long cc2(long cc) { return cc; } - long dd1(XXX::Long dd) { return dd; } + long dd1(XXX::Long dd) { return dd; } long dd2(long dd) { return dd; } %} %inline %{ -typedef Integer INTEGER; -template struct YYY { +typedef MyInteger MY_INTEGER; +template struct YYY { void meff(T1 t1, T2 t2) {} }; %} -%template(YYYIntInt) YYY; +%template(YYYIntInt) YYY; %inline %{ - void whyohwhy(YYY yy) {} + void whyohwhy(YYY yy) {} %}