Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_carrays
This commit is contained in:
parent
78b113558f
commit
9600c95234
11 changed files with 320 additions and 1 deletions
28
Examples/test-suite/li_carrays_cpp.i
Normal file
28
Examples/test-suite/li_carrays_cpp.i
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
%module li_carrays_cpp
|
||||
|
||||
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) doubleArray; /* Ruby, wrong class name */
|
||||
|
||||
%include <carrays.i>
|
||||
|
||||
%array_functions(int,intArray);
|
||||
%array_class(double, doubleArray);
|
||||
|
||||
%inline %{
|
||||
typedef struct {
|
||||
int x;
|
||||
int y;
|
||||
} XY;
|
||||
XY globalXYArray[3];
|
||||
|
||||
typedef struct {
|
||||
int a;
|
||||
int b;
|
||||
} AB;
|
||||
|
||||
AB globalABArray[3];
|
||||
%}
|
||||
|
||||
// Note that struct XY { ... }; gives compiler error for C when using %array_class or %array_functions, but is okay in C++
|
||||
%array_class(XY, XYArray)
|
||||
%array_functions(AB, ABArray)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue