new tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4637 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4cad223e98
commit
4bc26e78ca
4 changed files with 54 additions and 0 deletions
16
SWIG/Examples/test-suite/bloody_hell.i
Normal file
16
SWIG/Examples/test-suite/bloody_hell.i
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
%module bloody_hell
|
||||
|
||||
#define kMaxIOCTLSpaceParmsSize 128
|
||||
|
||||
%{
|
||||
#define kMaxIOCTLSpaceParmsSize 128
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
typedef struct sm_channel_ix_dump_parms {
|
||||
unsigned data[(kMaxIOCTLSpaceParmsSize - ((4*sizeof(int)) + (2*sizeof(unsigned))))/sizeof(unsigned)];
|
||||
} SM_CHANNEL_IX_DUMP_PARMS;
|
||||
%}
|
||||
|
||||
|
||||
|
||||
|
|
@ -68,6 +68,7 @@ CPP_TEST_CASES += \
|
|||
arrays_global \
|
||||
arrays_global_twodim \
|
||||
arrays_scope \
|
||||
bloody_hell \
|
||||
bool_default \
|
||||
bools \
|
||||
casts \
|
||||
|
|
@ -92,6 +93,7 @@ CPP_TEST_CASES += \
|
|||
cpp_static \
|
||||
cpp_typedef \
|
||||
default_cast \
|
||||
default_char \
|
||||
default_constructor \
|
||||
default_ns \
|
||||
default_ref \
|
||||
|
|
@ -108,6 +110,7 @@ CPP_TEST_CASES += \
|
|||
evil_diamond_ns \
|
||||
evil_diamond_prop \
|
||||
explicit \
|
||||
extend_placement \
|
||||
extend_template \
|
||||
extend_template_ns \
|
||||
global_ns_arg \
|
||||
|
|
|
|||
7
SWIG/Examples/test-suite/default_char.i
Normal file
7
SWIG/Examples/test-suite/default_char.i
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
%module default_char
|
||||
|
||||
%inline %{
|
||||
void test1(char c = 'x') {}
|
||||
void test2(char c = '\0') {}
|
||||
%}
|
||||
|
||||
28
SWIG/Examples/test-suite/extend_placement.i
Normal file
28
SWIG/Examples/test-suite/extend_placement.i
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
%module extend_placement
|
||||
|
||||
// Tests placement of %extend directives
|
||||
|
||||
// Before the class
|
||||
|
||||
%extend Foo {
|
||||
Foo() { return new Foo(); }
|
||||
~Foo() { delete self;}
|
||||
int spam(int x) { return x; }
|
||||
};
|
||||
|
||||
%inline %{
|
||||
class Foo { };
|
||||
%}
|
||||
|
||||
// After the class
|
||||
|
||||
%inline %{
|
||||
class Bar { };
|
||||
%}
|
||||
|
||||
|
||||
%extend Bar {
|
||||
Bar() { return new Bar(); }
|
||||
~Bar() { delete self;}
|
||||
int spam(int x) { return x; }
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue