diff --git a/Examples/test-suite/java/java_lib_arrays_runme.java b/Examples/test-suite/java/java_lib_arrays_runme.java index 299f4ffd5..9ee36210a 100644 --- a/Examples/test-suite/java/java_lib_arrays_runme.java +++ b/Examples/test-suite/java/java_lib_arrays_runme.java @@ -55,6 +55,12 @@ public class java_lib_arrays_runme { if (java_lib_arrays.extract_ptr(array_yet_another_struct, 0) != 222.333) throw new RuntimeException("extract_ptr 0 failed"); if (java_lib_arrays.extract_ptr(array_yet_another_struct, 1) != 444.555) throw new RuntimeException("extract_ptr 1 failed"); + java_lib_arrays.modifyYAS(array_yet_another_struct, array_yet_another_struct.length); + for (int i=0; i<2; ++i) { + if (array_yet_another_struct[i].getSimple().getDouble_field() != array_struct[i].getDouble_field() * 10.0) + throw new RuntimeException("modifyYAS failed "); + } + java_lib_arrays.toestest(array_toe, array_toe, array_toe); // Now set the array members and check that they have been set correctly diff --git a/Examples/test-suite/java_lib_arrays.i b/Examples/test-suite/java_lib_arrays.i index 4b99949af..0551cd100 100644 --- a/Examples/test-suite/java_lib_arrays.i +++ b/Examples/test-suite/java_lib_arrays.i @@ -36,6 +36,14 @@ struct YetAnotherStruct { double extract_ptr(struct YetAnotherStruct *yas, int index) { return yas[index].simple.double_field; } +void modifyYAS(struct YetAnotherStruct yas[], int size) { + int i; + for (i=0; i