Fix ARRAYSOFCLASSES bug reported by Kevin Mills where the changes made to an array element in the C layer are not reflected back into Java

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10220 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-01-25 22:03:12 +00:00
commit cc59a22121
2 changed files with 14 additions and 0 deletions

View file

@ -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