summaryrefslogtreecommitdiff
path: root/testtools/com/sun
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-11-12 21:46:06 +0200
committerTor Lillqvist <tml@collabora.com>2020-11-13 20:01:08 +0100
commit76fc34baeb4257e71092690b7039c0befe371bae (patch)
tree8c702aaee468c59229be5504b29ee7b651a858d2 /testtools/com/sun
parent7392394028275f05377ace11b1cab850e1fcf521 (diff)
Make bridgetest exercise parameter passing in the C++/UNO bridge harder
The C++/UNO bridge for macOS on arm64 currently uses the Linux code. Apple's ABI uses slightly different parameter passing on the stack, though. See https://developer.apple.com/documentation/xcode/writing_arm64_code_for_apple_platforms?language=objc That has not been taken into account yet in the bridge code. The bridgetest, when run on macOS on arm64, didn't notice, sadly, but succeeded. With this change it crashes, as one would expect it to do. Add one more byte and short parameter to the setValues(), setValues2() and getValues() calls in the XBridgeTestBase interface. The stack allocation for those [in] parameters to setValues() differ between the Linux and Apple ABIs. Add corresponding attributes to the interface, and members to the SimpleTest struct. The changes to the source files in the cli subdirectory (C++/CLI, VB.NET, and C#) are done blindly as they aren't compiled even on Windows currently. Most likely the changes to them are incomplete and erroneous. Change-Id: I6f689a130d89b23cad9918829107d7da49a79c55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105770 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'testtools/com/sun')
-rw-r--r--testtools/com/sun/star/comp/bridge/TestComponent.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java b/testtools/com/sun/star/comp/bridge/TestComponent.java
index f8b50f23e222..7d59de570591 100644
--- a/testtools/com/sun/star/comp/bridge/TestComponent.java
+++ b/testtools/com/sun/star/comp/bridge/TestComponent.java
@@ -304,6 +304,8 @@ public class TestComponent {
private float _float;
private double _double;
private String _string;
+ private byte _byte2;
+ private short _short2;
private Object _xInterface;
private Object _any;
private TestEnum _testEnum = TestEnum.TEST;
@@ -353,6 +355,8 @@ public class TestComponent {
double fDouble,
TestEnum testEnum,
String string,
+ byte nByte2,
+ short nShort2,
Object xInterface,
Object any,
TestElement testElements[],
@@ -373,6 +377,8 @@ public class TestComponent {
_double = fDouble;
_testEnum = testEnum;
_string = string;
+ _byte2 = nByte2;
+ _short2 = nShort2;
_xInterface = xInterface;
_any = any;
_testElements = testElements;
@@ -394,6 +400,8 @@ public class TestComponent {
/*INOUT*/double[] io_double,
/*INOUT*/TestEnum[] io_testEnum,
/*INOUT*/String[] io_string,
+ /*INOUT*/byte[] io_byte2,
+ /*INOUT*/short[] io_short2,
/*INOUT*/Object[] io_xInterface,
/*INOUT*/Object[] io_any,
/*INOUT*/TestElement[][] io_testElements,
@@ -414,6 +422,8 @@ public class TestComponent {
_double = io_double[0];
_testEnum = io_testEnum[0];
_string = io_string[0];
+ _byte2 = io_byte2[0];
+ _short2 = io_short2[0];
_xInterface = io_xInterface[0];
_any = io_any[0];
_testElements = io_testElements[0];
@@ -438,6 +448,8 @@ public class TestComponent {
/*OUT*/double[] o_double,
/*OUT*/TestEnum[] o_testEnum,
/*OUT*/String[] o_string,
+ /*OUT*/byte[] o_byte2,
+ /*OUT*/short[] o_short2,
/*OUT*/Object[] o_xInterface,
/*OUT*/Object[] o_any,
/*OUT*/TestElement[][] o_testElements,
@@ -458,7 +470,9 @@ public class TestComponent {
o_double[0] = _double;
o_testEnum[0] = _testEnum;
o_string[0] = _string;
- o_xInterface[0] = _xInterface;
+ o_byte2[0] = _byte2;
+ o_short2[0] = _short2;
+ o_xInterface[0] = _xInterface;
o_any[0] = _any;
o_testElements[0] = _testElements;
o_testDataElements[0] = _testDataElements;
@@ -611,6 +625,22 @@ public class TestComponent {
_string = string;
}
+ public byte getByte2() throws com.sun.star.uno.RuntimeException {
+ return _byte2;
+ }
+
+ public void setByte2(byte zbyte) throws com.sun.star.uno.RuntimeException {
+ _byte2 = zbyte;
+ }
+
+ public short getShort2() throws com.sun.star.uno.RuntimeException {
+ return _short2;
+ }
+
+ public void setShort2(short zshort) throws com.sun.star.uno.RuntimeException {
+ _short2 = zshort;
+ }
+
public Object getInterface() throws com.sun.star.uno.RuntimeException {
return _xInterface;
}