Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_carrays

This commit is contained in:
William S Fulton 2016-02-21 14:47:25 +00:00
commit 9600c95234
11 changed files with 320 additions and 1 deletions

View 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)