diff options
author | Alistair Delva <adelva@google.com> | 2024-04-10 14:15:29 -0700 |
---|---|---|
committer | Alistair Delva <adelva@google.com> | 2024-04-11 12:58:28 -0700 |
commit | d0f0f90be16c2ac553b5fa08512045273135147a (patch) | |
tree | 5d9ebb7a04807ea8a609ddd18b0162bc87530e4b /Examples/test-suite/java/template_template_parameters_runme.java | |
parent | 6ffc1dbf29ba98c4d8aa71ebc9b484e973fe1030 (diff) | |
download | swig-d0f0f90be16c2ac553b5fa08512045273135147a.tar.gz |
Change-Id: I47cef2be94299220d80265d949a95b58eee2c23b
Diffstat (limited to 'Examples/test-suite/java/template_template_parameters_runme.java')
-rw-r--r-- | Examples/test-suite/java/template_template_parameters_runme.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Examples/test-suite/java/template_template_parameters_runme.java b/Examples/test-suite/java/template_template_parameters_runme.java index 42135b982..244e12985 100644 --- a/Examples/test-suite/java/template_template_parameters_runme.java +++ b/Examples/test-suite/java/template_template_parameters_runme.java @@ -14,15 +14,37 @@ public class template_template_parameters_runme { } public static void main(String argv[]) { + // Test part 1 ListFastBool listBool = new ListFastBool(); listBool.setItem(true); + boolean x_boolean = listBool.getAllotype(); if (listBool.getItem() != true) throw new RuntimeException("Failed"); ListDefaultDouble listDouble = new ListDefaultDouble(); listDouble.setItem(10.2); + double x_double = listDouble.getAllotype(); if (listDouble.getItem() != 10.2) throw new RuntimeException("Failed"); + + // Test part 2 + FloatTestStruct floatTestStruct = new FloatTestStruct(); + FloatContainer2 floatContainer2 = floatTestStruct.getX(); + floatContainer2.setX(8.1f); + IntTestStruct intTestStruct = new IntTestStruct(); + IntContainer1 intContainer1 = intTestStruct.getX(); + intContainer1.setX(91); + if (intContainer1.getX() != 91) + throw new RuntimeException("Failed"); + if (intTestStruct.getX().getX() != 91) + throw new RuntimeException("Failed"); + IntTestStruct intTestStructReturned = template_template_parameters.TestStructContainer1Method(intTestStruct); + if (intTestStructReturned.getX().getX() != 101) + throw new RuntimeException("Failed"); + + // Test part 3 + MyFootInt99 mfi99 = new MyFootInt99(); + mfi99.OperatorPlusEquals(mfi99); } } |