diff --git a/Examples/test-suite/inctest.i b/Examples/test-suite/inctest.i index 50e15b0af..f33304284 100644 --- a/Examples/test-suite/inctest.i +++ b/Examples/test-suite/inctest.i @@ -14,3 +14,22 @@ // Also repeats the test for the import directive in subdirectories %include "testdir/test.i" + + +// Bug #1162194 +%inline %{ +typedef struct { +#include "inctest.h" +} MY_TYPES; + +%} + +%{ +typedef struct { +#include "inctest.h" +} MY_THINGS; +%} + +typedef struct { +%include "inctest.h" +} MY_THINGS; diff --git a/Examples/test-suite/java/inctest_runme.java b/Examples/test-suite/java/inctest_runme.java new file mode 100644 index 000000000..4c298ad20 --- /dev/null +++ b/Examples/test-suite/java/inctest_runme.java @@ -0,0 +1,21 @@ + +import inctest.*; + +public class inctest_runme { + static { + try { + System.loadLibrary("inctest"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e); + System.exit(1); + } + } + + public static void main(String argv[]) + { + MY_THINGS things = new MY_THINGS(); + int i=0; + things.setIntegerMember(i); + double d = things.getDoubleMember(); + } +}