Added broken test for template + specialization + enum
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4171 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a1e75c1c43
commit
2925b47883
2 changed files with 61 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ CPP_TEST_BROKEN = \
|
||||||
namespace_nested \
|
namespace_nested \
|
||||||
template_default_arg \
|
template_default_arg \
|
||||||
template_specialization_defarg \
|
template_specialization_defarg \
|
||||||
|
template_specialization_enum \
|
||||||
using_namespace
|
using_namespace
|
||||||
|
|
||||||
CPP_TEST_CASES += $(CPP_TEST_BROKEN)
|
CPP_TEST_CASES += $(CPP_TEST_BROKEN)
|
||||||
|
|
|
||||||
60
SWIG/Examples/test-suite/template_specialization_enum.i
Normal file
60
SWIG/Examples/test-suite/template_specialization_enum.i
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
%module template_specialization_enum
|
||||||
|
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
|
||||||
|
enum Hello
|
||||||
|
{
|
||||||
|
hi, hello
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template <Hello, class A>
|
||||||
|
struct C
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template <Hello, class BB>
|
||||||
|
struct Base
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template <class A>
|
||||||
|
struct C<hello , A> : Base<hello, A>
|
||||||
|
{
|
||||||
|
int hello()
|
||||||
|
{
|
||||||
|
return hello;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
C()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template <class A>
|
||||||
|
struct C<hi , A> : Base<hi, A>
|
||||||
|
{
|
||||||
|
int hi()
|
||||||
|
{
|
||||||
|
return hi;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
C()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
||||||
|
%template(Base_dd) Base<hi, int>;
|
||||||
|
%template(Base_ii) Base<hello, int>;
|
||||||
|
|
||||||
|
%template(C_i) C<hi, int>;
|
||||||
|
%template(C_d) C<hello, int>;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue