summaryrefslogtreecommitdiff
path: root/testtools
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
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')
-rw-r--r--testtools/com/sun/star/comp/bridge/TestComponent.java32
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx31
-rw-r--r--testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx34
-rw-r--r--testtools/source/bridgetest/cli/cli_cs_bridgetest.cs30
-rw-r--r--testtools/source/bridgetest/cli/cli_cs_testobj.cs24
-rw-r--r--testtools/source/bridgetest/cli/cli_vb_bridgetest.vb43
-rw-r--r--testtools/source/bridgetest/cppobj.cxx32
-rw-r--r--testtools/source/bridgetest/idl/bridgetest.idl10
8 files changed, 209 insertions, 27 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;
}
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index 13271d90c9cb..f02a6c99f4b9 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -135,6 +135,8 @@ static bool equals( const TestElement & rData1, const TestElement & rData2 )
check( rData1.Double == rData2.Double, "### double does not match!" );
check( rData1.Enum == rData2.Enum, "### enum does not match!" );
check( rData1.String == rData2.String, "### string does not match!" );
+ check( rData1.Byte2 == rData2.Byte2, "### byte2 does not match!" );
+ check( rData1.Short2 == rData2.Short2, "### short2 does not match!" );
check( rData1.Interface == rData2.Interface, "### interface does not match!" );
check( rData1.Any == rData2.Any, "### any does not match!" );
@@ -151,6 +153,8 @@ static bool equals( const TestElement & rData1, const TestElement & rData2 )
rData1.Double == rData2.Double &&
rData1.Enum == rData2.Enum &&
rData1.String == rData2.String &&
+ rData1.Byte2 == rData2.Byte2 &&
+ rData1.Short2 == rData2.Short2 &&
rData1.Interface == rData2.Interface &&
rData1.Any == rData2.Any);
}
@@ -189,6 +193,7 @@ static void assign( TestElement & rData,
sal_Int64 nHyper, sal_uInt64 nUHyper,
float fFloat, double fDouble,
TestEnum eEnum, const OUString& rStr,
+ sal_Int8 nByte2, sal_Int16 nShort2,
const css::uno::Reference< css::uno::XInterface >& xTest,
const css::uno::Any& rAny )
{
@@ -205,6 +210,8 @@ static void assign( TestElement & rData,
rData.Double = fDouble;
rData.Enum = eEnum;
rData.String = rStr;
+ rData.Byte2 = nByte2;
+ rData.Short2 = nShort2;
rData.Interface = xTest;
rData.Any = rAny;
}
@@ -261,6 +268,8 @@ static bool performAnyTest( const Reference< XBridgeTest > &xLBT, const TestData
bReturn = testAny( data.Double,xLBT ) && bReturn;
bReturn = testAny( data.Enum,xLBT ) && bReturn;
bReturn = testAny( data.String,xLBT ) && bReturn;
+ bReturn = testAny( data.Byte2 ,xLBT ) && bReturn;
+ bReturn = testAny( data.Short2,xLBT ) && bReturn;
bReturn = testAny( data.Interface,xLBT ) && bReturn;
bReturn = testAny( data, xLBT ) && bReturn;
bReturn &= testAny(
@@ -365,7 +374,7 @@ static bool performTest(
static_cast<TestElement &>(aData), true, '@', 17, 0x1234, 0xFEDC,
0x12345678, 0xFEDCBA98, SAL_CONST_INT64(0x123456789ABCDEF0),
SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
- TestEnum_LOLA, STRING_TEST_CONSTANT, xI,
+ TestEnum_LOLA, STRING_TEST_CONSTANT, 18, 0x5678, xI,
Any(&xI, cppu::UnoType<XInterface>::get()));
bRet &= check(aData.Any == xI, "### unexpected any!");
bRet &= check(!(aData.Any != xI), "### unexpected any!");
@@ -378,7 +387,7 @@ static bool performTest(
static_cast<TestElement &>(aSetData), aData.Bool, aData.Char,
aData.Byte, aData.Short, aData.UShort, aData.Long, aData.ULong,
aData.Hyper, aData.UHyper, aData.Float, aData.Double, aData.Enum,
- aData.String, xI, Any(&xI, cppu::UnoType<XInterface>::get()));
+ aData.String, aData.Byte2, aData.Short2, xI, Any(&xI, cppu::UnoType<XInterface>::get()));
aSetData.Sequence.realloc(2);
aSetData.Sequence[0] = *static_cast<TestElement const *>(&aSetData);
// aSetData.Sequence[1] is empty
@@ -396,6 +405,8 @@ static bool performTest(
aSetData.Double,
aSetData.Enum,
aSetData.String,
+ aSetData.Byte2,
+ aSetData.Short2,
aSetData.Interface,
aSetData.Any,
aSetData.Sequence,
@@ -417,6 +428,8 @@ static bool performTest(
aRet.Double,
aRet.Enum,
aRet.String,
+ aRet.Byte2,
+ aRet.Short2,
aRet.Interface,
aRet.Any,
aRet.Sequence,
@@ -439,6 +452,8 @@ static bool performTest(
aRet.Double,
aRet.Enum,
aRet.String,
+ aRet.Byte2,
+ aRet.Short2,
aRet.Interface,
aRet.Any,
aRet.Sequence,
@@ -490,6 +505,8 @@ static bool performTest(
aRet.Double,
aRet.Enum,
aRet.String,
+ aRet.Byte2,
+ aRet.Short2,
aRet.Interface,
aRet.Any,
aRet.Sequence,
@@ -512,6 +529,8 @@ static bool performTest(
xLBT->setDouble(aRet.Double);
xLBT->setEnum(aRet.Enum);
xLBT->setString(aRet.String);
+ xLBT->setByte2(aRet.Byte2);
+ xLBT->setShort2(aRet.Short2);
xLBT->setInterface(aRet.Interface);
xLBT->setAny(aRet.Any);
xLBT->setSequence(aRet.Sequence);
@@ -532,6 +551,8 @@ static bool performTest(
aRet.ULong = xLBT->getULong();
aRet.Enum = xLBT->getEnum();
aRet.String = xLBT->getString();
+ aRet.Byte2 = xLBT->getByte2();
+ aRet.Short2 = xLBT->getShort2();
aRet.Interface = xLBT->getInterface();
aRet.Any = xLBT->getAny();
aRet.Sequence = xLBT->getSequence();
@@ -692,19 +713,19 @@ static bool performTest(
_arStruct[0], true, '@', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
SAL_CONST_INT64(0x123456789ABCDEF0),
SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
- TestEnum_LOLA, STRING_TEST_CONSTANT, _arObj[0],
+ TestEnum_LOLA, STRING_TEST_CONSTANT, 18, 0x5678, _arObj[0],
Any(&_arObj[0], cppu::UnoType<XInterface>::get()));
assign(
_arStruct[1], true, 'A', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
SAL_CONST_INT64(0x123456789ABCDEF0),
SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
- TestEnum_TWO, STRING_TEST_CONSTANT, _arObj[1],
+ TestEnum_TWO, STRING_TEST_CONSTANT, 18, 0x5678, _arObj[1],
Any(&_arObj[1], cppu::UnoType<XInterface>::get()));
assign(
_arStruct[2], true, 'B', 17, 0x1234, 0xFEDC, 0x12345678, 0xFEDCBA98,
SAL_CONST_INT64(0x123456789ABCDEF0),
SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
- TestEnum_CHECK, STRING_TEST_CONSTANT, _arObj[2],
+ TestEnum_CHECK, STRING_TEST_CONSTANT, 18, 0x5678, _arObj[2],
Any(&_arObj[2], cppu::UnoType<XInterface>::get()));
{
Sequence<sal_Bool> arBool({true, false, true});
diff --git a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
index 79d101f86fb9..ad21e3963bd8 100644
--- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
+++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
@@ -190,6 +190,8 @@ public __gc class BridgeTest : public WeakBase, public XMain
check( rData1->Double == rData2->Double, "### double does not match!" );
check( rData1->Enum == rData2->Enum, "### enum does not match!" );
check( rData1->String == rData2->String, "### string does not match!" );
+ check( rData1->Byte2 == rData2->Byte2, "### byte2 does not match!" );
+ check( rData1->Short2 == rData2->Short2, "### short2 does not match!" );
check( rData1->Interface == rData2->Interface, "### interface does not match!" );
check( compareData(__box(rData1->Any), __box(rData2->Any)), "### any does not match!" );
@@ -206,6 +208,8 @@ public __gc class BridgeTest : public WeakBase, public XMain
rData1->Double == rData2->Double &&
rData1->Enum == rData2->Enum &&
rData1->String == rData2->String &&
+ rData1->Byte2 == rData2->Byte2 &&
+ rData1->Short2 == rData2->Short2 &&
rData1->Interface == rData2->Interface &&
compareData(__box(rData1->Any), __box(rData2->Any)));
}
@@ -217,6 +221,7 @@ static void assign( TestElement* rData,
Int64 nHyper, UInt64 nUHyper,
float fFloat, double fDouble,
TestEnum eEnum, String* rStr,
+ Byte nByte2, Int16 nShort2,
Object* xTest,
uno::Any rAny )
{
@@ -233,6 +238,8 @@ static void assign( TestElement* rData,
rData->Double = fDouble;
rData->Enum = eEnum;
rData->String = rStr;
+ rData->Byte2 = nByte2;
+ rData->Short2 = nShort2;
rData->Interface = xTest;
rData->Any = rAny;
}
@@ -244,13 +251,14 @@ static void assign( TestDataElements* rData,
Int64 nHyper, UInt64 nUHyper,
float fFloat, double fDouble,
TestEnum eEnum, String* rStr,
+ Byte nByte2, Int16 nShort2,
Object* xTest,
Any rAny,
TestElement* rSequence[])
{
assign( static_cast<TestElement*>(rData),
bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny );
+ eEnum, rStr, nByte2, nShort2, xTest, rAny );
rData->Sequence = rSequence;
}
@@ -287,6 +295,8 @@ static bool performAnyTest(XBridgeTest* xLBT, TestDataElements* data)
bReturn = testAny( 0, __box(data->Double),xLBT ) && bReturn;
bReturn = testAny( 0, __box(data->Enum), xLBT ) && bReturn;
bReturn = testAny( 0, data->String,xLBT ) && bReturn;
+ bReturn = testAny( 0, data->Byte2,xLBT ) && bReturn;
+ bReturn = testAny( 0, data->Short2,xLBT ) && bReturn;
bReturn = testAny(__typeof(XWeak), data->Interface,xLBT ) && bReturn;
bReturn = testAny(0, data, xLBT ) && bReturn;
@@ -378,6 +388,7 @@ static bool performTest(XBridgeTest* xLBT)
aData->UShort, aData->Long, aData->ULong,
aData->Hyper, aData->UHyper, aData->Float,
aData->Double, aData->Enum, aData->String,
+ aData->Byte2, aData->Short2,
aData->Interface, aData->Any); //(TestElement) aData;
aData->Sequence[1] = new TestElement(); //is empty
@@ -395,6 +406,8 @@ static bool performTest(XBridgeTest* xLBT)
aData->Long, aData->ULong, aData->Hyper, aData->UHyper, aData->Float, aData->Double,
aData->Enum,
aData->String,
+ aData->Byte2,
+ aData->Short2,
xI,
aAnySet);
@@ -404,6 +417,7 @@ static bool performTest(XBridgeTest* xLBT)
aSetData->UShort, aSetData->Long, aSetData->ULong,
aSetData->Hyper, aSetData->UHyper, aSetData->Float,
aSetData->Double, aSetData->Enum, aSetData->String,
+ aSetData->Byte2, aSetData->Short2,
aSetData->Interface, aSetData->Any); //TestElement) aSetData;
aSetData->Sequence[1] = new TestElement(); // empty struct
@@ -421,6 +435,8 @@ static bool performTest(XBridgeTest* xLBT)
aSetData->Double,
aSetData->Enum,
aSetData->String,
+ aSetData->Byte2,
+ aSetData->Short2,
aSetData->Interface,
aSetData->Any,
aSetData->Sequence,
@@ -443,6 +459,8 @@ static bool performTest(XBridgeTest* xLBT)
& aRet->Double,
& aRet->Enum,
& aRet->String,
+ & aRet->Byte2,
+ & aRet->Short2,
& aRet->Interface,
& aRet->Any,
& aRet->Sequence,
@@ -465,6 +483,8 @@ static bool performTest(XBridgeTest* xLBT)
& aRet->Double,
& aRet->Enum,
& aRet->String,
+ & aRet->Byte2,
+ & aRet->Short2,
& aRet->Interface,
& aRet->Any,
& aRet->Sequence,
@@ -497,6 +517,8 @@ static bool performTest(XBridgeTest* xLBT)
& aRet->Double,
& aRet->Enum,
& aRet->String,
+ & aRet->Byte2,
+ & aRet->Short2,
& aRet->Interface,
& aRet->Any,
& aRet->Sequence,
@@ -518,6 +540,8 @@ static bool performTest(XBridgeTest* xLBT)
xLBT->Double = aRet->Double;
xLBT->Enum = aRet->Enum;
xLBT->String = aRet->String;
+ xLBT->Byte2 = aRet->Byte2;
+ xLBT->Short2 = aRet->Short2;
xLBT->Interface = aRet->Interface;
xLBT->Any = aRet->Any;
xLBT->Sequence = aRet->Sequence;
@@ -539,6 +563,8 @@ static bool performTest(XBridgeTest* xLBT)
aRet->ULong = xLBT->ULong;
aRet->Enum = xLBT->Enum;
aRet->String = xLBT->String;
+ aRet->Byte2 = xLBT->Byte2;
+ aRet->Short2 = xLBT->Short2;
aRet->Interface = xLBT->Interface;
aRet->Any = xLBT->Any;
aRet->Sequence = xLBT->Sequence;
@@ -625,15 +651,15 @@ static bool performSequenceTest(XBridgeTest* xBT)
arStruct[2] = new TestElement();
assign( arStruct[0], true, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, 3.1415926359,
- TestEnum::LOLA, Constants::STRING_TEST_CONSTANT, arObject[0],
+ TestEnum::LOLA, Constants::STRING_TEST_CONSTANT, 18, 0x5678, arObject[0],
Any( __typeof(Object), arObject[0]) );
assign( arStruct[1], true, 'A', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, 3.1415926359,
- TestEnum::TWO, Constants::STRING_TEST_CONSTANT, arObject[1],
+ TestEnum::TWO, Constants::STRING_TEST_CONSTANT, 18, 0x5678, arObject[1],
Any( __typeof(Object), arObject[1]) );
assign( arStruct[2], true, 'B', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
0x123456789abcdef0, 0xfedcba9876543210, 17.0815f, 3.1415926359,
- TestEnum::CHECK, Constants::STRING_TEST_CONSTANT, arObject[2],
+ TestEnum::CHECK, Constants::STRING_TEST_CONSTANT, 18, 0x5678, arObject[2],
Any( __typeof(Object), arObject[2] ) );
{
Any seqAnyRet[] = xBT2->setSequenceAny(arAny);
diff --git a/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs b/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs
index 7530d83cec80..3552f3f730af 100644
--- a/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs
+++ b/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs
@@ -176,6 +176,8 @@ public class BridgeTest : WeakBase, XMain
check( rData1.Double == rData2.Double, "### double does not match!" );
check( rData1.Enum == rData2.Enum, "### enum does not match!" );
check( rData1.String == rData2.String, "### string does not match!" );
+ check( rData1.Byte2 == rData2.Byte2, "### byte2 does not match!" );
+ check( rData1.Short2 == rData2.Short2, "### short2 does not match!" );
check( rData1.Interface == rData2.Interface, "### interface does not match!" );
check( compareData(rData1.Any, rData2.Any), "### any does not match!" );
@@ -192,6 +194,8 @@ public class BridgeTest : WeakBase, XMain
rData1.Double == rData2.Double &&
rData1.Enum == rData2.Enum &&
rData1.String == rData2.String &&
+ rData1.Byte2 == rData2.Byte2 &&
+ rData1.Short2 == rData2.Short2 &&
rData1.Interface == rData2.Interface &&
compareData(rData1.Any, rData2.Any));
}
@@ -203,6 +207,7 @@ static void assign( TestElement rData,
long nHyper, ulong nUHyper,
float fFloat, double fDouble,
TestEnum eEnum, string rStr,
+ byte nByte2, short nShort2,
Object xTest,
Any rAny )
{
@@ -219,6 +224,8 @@ static void assign( TestElement rData,
rData.Double = fDouble;
rData.Enum = eEnum;
rData.String = rStr;
+ rData.Byte2 = nByte2;
+ rData.Short2 = nShort2;
rData.Interface = xTest;
rData.Any = rAny;
}
@@ -230,13 +237,14 @@ static void assign( TestDataElements rData,
long nHyper, ulong nUHyper,
float fFloat, double fDouble,
TestEnum eEnum, string rStr,
+ byte nByte2, short nShort2,
Object xTest,
Any rAny,
TestElement[] rSequence)
{
assign( (TestElement) rData,
bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny );
+ eEnum, rStr, nByte2, nShort2, xTest, rAny );
rData.Sequence = rSequence;
}
@@ -275,6 +283,8 @@ static bool performAnyTest(XBridgeTest xLBT, TestDataElements data)
bReturn = testAny( null, data.Double,xLBT ) && bReturn;
bReturn = testAny( null, data.Enum,xLBT ) && bReturn;
bReturn = testAny( null, data.String,xLBT ) && bReturn;
+ bReturn = testAny( null, data.Byte2 ,xLBT ) && bReturn;
+ bReturn = testAny( null, data.Short2,xLBT ) && bReturn;
bReturn = testAny(typeof(XWeak), data.Interface,xLBT ) && bReturn;
bReturn = testAny(null, data, xLBT ) && bReturn;
@@ -369,6 +379,7 @@ bool performTest(XBridgeTest xLBT)
aData.UShort, aData.Long, aData.ULong,
aData.Hyper, aData.UHyper, aData.Float,
aData.Double, aData.Enum, aData.String,
+ aData.Byte2, aData.Short2,
aData.Interface, aData.Any); //(TestElement) aData;
aData.Sequence[1] = new TestElement(); //is empty
@@ -380,7 +391,7 @@ bool performTest(XBridgeTest xLBT)
assign( (TestElement)aSetData,
aData.Bool, aData.Char, aData.Byte, aData.Short, aData.UShort,
aData.Long, aData.ULong, aData.Hyper, aData.UHyper, aData.Float, aData.Double,
- aData.Enum, aData.String, xI,
+ aData.Enum, aData.String, aData.Byte2, aData.Short2, xI,
aAnySet);
aSetData.Sequence = new TestElement[2];
@@ -389,6 +400,7 @@ bool performTest(XBridgeTest xLBT)
aSetData.UShort, aSetData.Long, aSetData.ULong,
aSetData.Hyper, aSetData.UHyper, aSetData.Float,
aSetData.Double, aSetData.Enum, aSetData.String,
+ aSetData.Byte2, aSetData.Short2,
aSetData.Interface, aSetData.Any); //TestElement) aSetData;
aSetData.Sequence[1] = new TestElement(); // empty struct
@@ -406,6 +418,8 @@ bool performTest(XBridgeTest xLBT)
aSetData.Double,
aSetData.Enum,
aSetData.String,
+ aSetData.Byte2,
+ aSetData.Short2,
aSetData.Interface,
aSetData.Any,
aSetData.Sequence,
@@ -428,6 +442,8 @@ bool performTest(XBridgeTest xLBT)
out aRet.Double,
out aRet.Enum,
out aRet.String,
+ out aRet.Byte2,
+ out aRet.Short2,
out aRet.Interface,
out aRet.Any,
out aRet.Sequence,
@@ -450,6 +466,8 @@ bool performTest(XBridgeTest xLBT)
ref aRet.Double,
ref aRet.Enum,
ref aRet.String,
+ ref aRet.Byte2,
+ ref aRet.Short2,
ref aRet.Interface,
ref aRet.Any,
ref aRet.Sequence,
@@ -482,6 +500,8 @@ bool performTest(XBridgeTest xLBT)
out aRet.Double,
out aRet.Enum,
out aRet.String,
+ out aRet.Byte2,
+ out aRet.Short2,
out aRet.Interface,
out aRet.Any,
out aRet.Sequence,
@@ -495,7 +515,7 @@ bool performTest(XBridgeTest xLBT)
xLBT.Byte = aRet.Byte;
xLBT.Short = aRet.Short;
xLBT.UShort = aRet.UShort;
- xLBT.Long = aRet.Long;
+ xLBT.Long = aRet.Long;
xLBT.ULong = aRet.ULong;
xLBT.Hyper = aRet.Hyper;
xLBT.UHyper = aRet.UHyper;
@@ -503,6 +523,8 @@ bool performTest(XBridgeTest xLBT)
xLBT.Double = aRet.Double;
xLBT.Enum = aRet.Enum;
xLBT.String = aRet.String;
+ xLBT.Byte2 = aRet.Byte2;
+ xLBT.Short2 = aRet.Short2;
xLBT.Interface = aRet.Interface;
xLBT.Any = aRet.Any;
xLBT.Sequence = aRet.Sequence;
@@ -524,6 +546,8 @@ bool performTest(XBridgeTest xLBT)
aRet.ULong = xLBT.ULong;
aRet.Enum = xLBT.Enum;
aRet.String = xLBT.String;
+ aRet.Byte2 = xLBT.Byte2;
+ aRet.Short2 = xLBT.Short2;
aRet.Interface = xLBT.Interface;
aRet.Any = xLBT.Any;
aRet.Sequence = xLBT.Sequence;
diff --git a/testtools/source/bridgetest/cli/cli_cs_testobj.cs b/testtools/source/bridgetest/cli/cli_cs_testobj.cs
index df8f4cdc3309..a8722edc65aa 100644
--- a/testtools/source/bridgetest/cli/cli_cs_testobj.cs
+++ b/testtools/source/bridgetest/cli/cli_cs_testobj.cs
@@ -57,6 +57,8 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
private float _float;
private double _double;
private String _string;
+ private byte _byte2;
+ private short _short2;
private Object _xInterface;
private Any _any;
private TestEnum _testEnum = TestEnum.TEST;
@@ -101,6 +103,8 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
double fDouble,
TestEnum testEnum,
String str,
+ byte nByte2,
+ short nShort2,
Object xInterface,
Any any,
TestElement [] testElements,
@@ -121,6 +125,8 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
_double = fDouble;
_testEnum = testEnum;
_string = str;
+ _byte2 = nByte2;
+ _short2 = nShort2;
_xInterface = xInterface;
_any = any;
_testElements = testElements;
@@ -141,6 +147,8 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
/*INOUT*/ref double io_double,
/*INOUT*/ref TestEnum io_testEnum,
/*INOUT*/ref String io_string,
+ /*INOUT*/ref byte io_byte2,
+ /*INOUT*/ref short io_short2,
/*INOUT*/ref Object io_xInterface,
/*INOUT*/ref Any io_any,
/*INOUT*/ref TestElement[] io_testElements,
@@ -161,6 +169,8 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
_double = io_double;
_testEnum = io_testEnum;
_string = io_string;
+ _byte2 = io_byte2;
+ _short2 = io_short2;
_xInterface = io_xInterface;
_any = io_any;
_testElements = (TestElement[]) io_testElements.Clone();
@@ -187,6 +197,8 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
/*OUT*/out double o_double,
/*OUT*/out TestEnum o_testEnum,
/*OUT*/out String o_string,
+ /*OUT*/out byte o_byte2,
+ /*OUT*/out short o_short2,
/*OUT*/out Object o_xInterface,
/*OUT*/out Any o_any,
/*OUT*/out TestElement[] o_testElements,
@@ -207,6 +219,8 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
o_double = _double;
o_testEnum = _testEnum;
o_string = _string;
+ o_byte2 = _byte2;
+ o_short2 = _short2;
o_xInterface = _xInterface;
o_any = _any;
o_testElements = _testElements;
@@ -331,6 +345,16 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
get { return _string; }
set { _string = value; }
}
+ public byte Byte2
+ {
+ get { return _byte2; }
+ set { _byte2 = value; }
+ }
+ public short Short2
+ {
+ get { return _short2; }
+ set { _short2 = value; }
+ }
public Object Interface
{
get { return _xInterface; }
diff --git a/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb b/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb
index b2139601cb0b..18abd584bbab 100644
--- a/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb
+++ b/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb
@@ -78,10 +78,12 @@ Public Class BridgeTest
End Function
Private Shared Sub assign( rData As TestElement, bBool As Boolean, _
- aChar As Char, nByte As Byte, nShort As Short, nUShort As UInt16, _
+ aChar As Char, nByte As Byte, nShort As Short, nUShort As UInt16, _
nLong As Integer, nULong As UInt32, nHyper As Long, _
- nUHyper As UInt64, fFloat As Single, fDouble As Double, _
- eEnum As TestEnum, rStr As String, xTest As Object, _
+ UHyper As UInt64, fFloat As Single, fDouble As Double, _
+ eEnum As TestEnum, rStr As String, _
+ nByte2 As Byte, nShort2 As Short, _
+ xTest As Object, _
rAny As Any)
rData.Bool = bBool
@@ -97,20 +99,24 @@ Public Class BridgeTest
rData.Double = fDouble
rData.Enum = eEnum
rData.String = rStr
+ rData.Byte2 = nByte2
+ rData.Short2 = nShort2
rData.Interface = xTest
rData.Any = rAny
End Sub
Private Shared Sub assign( rData As TestDataElements, bBool As Boolean, _
- aChar As Char, nByte As Byte, nShort As Short, nUShort As UInt16, _
+ aChar As Char, nByte As Byte, nShort As Short, nUShort As UInt16, _
nLong As Integer, nULong As UInt32, nHyper As Long, _
- nUHyper As UInt64, fFloat As Single, fDouble As Double, _
- eEnum As TestEnum, rStr As String, xTest As Object, _
+ nUHyper As UInt64, fFloat As Single, fDouble As Double, _
+ eEnum As TestEnum, rStr As String, _
+ nByte2 As Byte, nShort2 As Short, _
+ xTest As Object, _
rAny As Any, rSequence() As TestElement)
assign( DirectCast( rData,TestElement), _
bBool, aChar, nByte, nShort, nUShort, nLong, nULong, nHyper, _
- nUHyper, fFloat, fDouble, eEnum, rStr, xTest, rAny )
+ nUHyper, fFloat, fDouble, eEnum, rStr, nByte2, nShort2, xTest, rAny )
rData.Sequence = rSequence
End Sub
@@ -238,17 +244,17 @@ Public Class BridgeTest
assign( arStruct(0), True, "@"C, 17, &H1234, Convert.ToUInt16(&Hfedc), _
&H12345678, Convert.ToUInt32(&H123456), &H123456789abcdef0, _
Convert.ToUInt64(123456788), 17.0815F, 3.1415926359, _
- TestEnum.LOLA, CONSTANTS.STRING_TEST_CONSTANT, arObject(0), _
+ TestEnum.LOLA, CONSTANTS.STRING_TEST_CONSTANT, 18, &H5678, arObject(0), _
New Any(GetType(System.Object), arObject(0)))
assign( arStruct(1), True, "A"C, 17, &H1234, Convert.ToUInt16(&Hfedc), _
&H12345678, Convert.ToUInt32(&H123456), &H123456789abcdef0, _
Convert.ToUInt64(12345678), 17.0815F, 3.1415926359, _
- TestEnum.TWO, CONSTANTS.STRING_TEST_CONSTANT, arObject(1), _
+ TestEnum.TWO, CONSTANTS.STRING_TEST_CONSTANT, 18, &H5678, arObject(1), _
New Any(GetType(System.Object), arObject(1)) )
assign( arStruct(2), True, "B"C, 17, &H1234, Convert.ToUInt16(&Hfedc), _
&H12345678, Convert.ToUInt32(654321), &H123456789abcdef0, _
Convert.ToUInt64(87654321), 17.0815F, 3.1415926359, _
- TestEnum.CHECK, Constants.STRING_TEST_CONSTANT, arObject(2), _
+ TestEnum.CHECK, Constants.STRING_TEST_CONSTANT, 18, &H5678, arObject(2), _
New Any(GetType(System.Object), arObject(2)))
@@ -497,6 +503,8 @@ Public Class BridgeTest
bReturn = testAny( Nothing, data.Double,xLBT ) And bReturn
bReturn = testAny( Nothing, data.Enum,xLBT ) And bReturn
bReturn = testAny( Nothing, data.String,xLBT ) And bReturn
+ bReturn = testAny( Nothing, data.Byte2 ,xLBT ) And bReturn
+ bReturn = testAny( Nothing, data.Short2,xLBT ) And bReturn
bReturn = testAny(GetType(unoidl.com.sun.star.uno.XWeak), _
data.Interface,xLBT ) And bReturn
bReturn = testAny(Nothing, data, xLBT ) And bReturn
@@ -584,6 +592,7 @@ Public Class BridgeTest
aSetData.UShort, aSetData.Long, aSetData.ULong, _
aSetData.Hyper, aSetData.UHyper, aSetData.Float, _
aSetData.Double, aSetData.Enum, aSetData.String, _
+ aSetData.Byte2, aSetData.Short2, _
aSetData.Interface, aSetData.Any)
aSetData.Sequence(1) = New TestElement ' empty struct
@@ -601,6 +610,8 @@ Public Class BridgeTest
aSetData.Double, _
aSetData.Enum, _
aSetData.String, _
+ aSetData.Byte2, _
+ aSetData.Short2, _
aSetData.Interface, _
aSetData.Any, _
aSetData.Sequence, _
@@ -623,6 +634,8 @@ Public Class BridgeTest
aRet.Double, _
aRet.Enum, _
aRet.String, _
+ aRet.Byte2, _
+ aRet.Short2, _
aRet.Interface, _
aRet.Any, _
aRet.Sequence, _
@@ -646,6 +659,8 @@ Public Class BridgeTest
aRet.Double, _
aRet.Enum, _
aRet.String, _
+ aRet.Byte2, _
+ aRet.Short2, _
aRet.Interface, _
aRet.Any, _
aRet.Sequence, _
@@ -678,6 +693,8 @@ Public Class BridgeTest
aRet.Double, _
aRet.Enum, _
aRet.String, _
+ aRet.Byte2, _
+ aRet.Short2, _
aRet.Interface, _
aRet.Any, _
aRet.Sequence, _
@@ -693,7 +710,7 @@ Public Class BridgeTest
xLBT.Byte = aRet.Byte
xLBT.Short = aRet.Short
xLBT.UShort = aRet.UShort
- xLBT.Long = aRet.Long
+ xLBT.Long = aRet.Long
xLBT.ULong = aRet.ULong
xLBT.Hyper = aRet.Hyper
xLBT.UHyper = aRet.UHyper
@@ -701,6 +718,8 @@ Public Class BridgeTest
xLBT.Double = aRet.Double
xLBT.Enum = aRet.Enum
xLBT.String = aRet.String
+ xLBT.Byte2 = aRet.Byte2
+ xLBT.Short2 = aRet.Short2
xLBT.Interface = aRet.Interface
xLBT.Any = aRet.Any
xLBT.Sequence = aRet.Sequence
@@ -722,6 +741,8 @@ Public Class BridgeTest
aRet.ULong = xLBT.ULong
aRet.Enum = xLBT.Enum
aRet.String = xLBT.String
+ aRet.Byte2 = xLBT.Byte2
+ aRet.Short2 = xLBT.Short2
aRet.Interface = xLBT.Interface
aRet.Any = xLBT.Any
aRet.Sequence = xLBT.Sequence
diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index ddd213c83bd0..1456c29649cf 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -80,6 +80,7 @@ static void assign( TestElement & rData,
sal_Int64 nHyper, sal_uInt64 nUHyper,
float fFloat, double fDouble,
TestEnum eEnum, const OUString& rStr,
+ sal_Int8 nByte2, sal_Int16 nShort2,
const css::uno::Reference< css::uno::XInterface >& xTest,
const css::uno::Any& rAny )
{
@@ -96,6 +97,8 @@ static void assign( TestElement & rData,
rData.Double = fDouble;
rData.Enum = eEnum;
rData.String = rStr;
+ rData.Byte2 = nByte2;
+ rData.Short2 = nShort2;
rData.Interface = xTest;
rData.Any = rAny;
}
@@ -107,13 +110,14 @@ static void assign( TestData & rData,
sal_Int64 nHyper, sal_uInt64 nUHyper,
float fFloat, double fDouble,
TestEnum eEnum, const OUString& rStr,
+ sal_Int8 nByte2, sal_Int16 nShort2,
const css::uno::Reference< css::uno::XInterface >& xTest,
const css::uno::Any& rAny,
const css::uno::Sequence< TestElement >& rSequence )
{
assign( static_cast<TestElement &>(rData),
bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny );
+ eEnum, rStr, nByte2, nShort2, xTest, rAny );
rData.Sequence = rSequence;
}
@@ -182,6 +186,8 @@ public:
double fDouble,
TestEnum eEnum,
const OUString& rStr,
+ sal_Int8 nByte2,
+ sal_Int16 nShort2,
const css::uno::Reference< css::uno::XInterface >& xTest,
const css::uno::Any& rAny,
const css::uno::Sequence<TestElement >& rSequence,
@@ -200,6 +206,8 @@ public:
double& fDouble,
TestEnum& eEnum,
OUString& rStr,
+ sal_Int8& nByte2,
+ sal_Int16& nShort2,
css::uno::Reference< css::uno::XInterface >& xTest,
css::uno::Any& rAny,
css::uno::Sequence<TestElement >& rSequence,
@@ -218,6 +226,8 @@ public:
double& fDouble,
TestEnum& eEnum,
OUString& rStr,
+ sal_Int8& nByte2,
+ sal_Int16& nShort2,
css::uno::Reference< css::uno::XInterface >& xTest,
css::uno::Any& rAny,
css::uno::Sequence< TestElement >& rSequence,
@@ -269,6 +279,10 @@ public:
{ return _aData.Enum; }
virtual OUString SAL_CALL getString() override
{ return _aData.String; }
+ virtual sal_Int8 SAL_CALL getByte2() override
+ { return _aData.Byte2; }
+ virtual sal_Int16 SAL_CALL getShort2() override
+ { return _aData.Short2; }
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getInterface( ) override
{ return _aData.Interface; }
virtual css::uno::Any SAL_CALL getAny() override
@@ -304,6 +318,10 @@ public:
{ _aData.Enum = _enum; }
virtual void SAL_CALL setString( const OUString& _string ) override
{ _aData.String = _string; }
+ virtual void SAL_CALL setByte2( sal_Int8 _byte ) override
+ { _aData.Byte2 = _byte; }
+ virtual void SAL_CALL setShort2( sal_Int16 _short ) override
+ { _aData.Short2 = _short; }
virtual void SAL_CALL setInterface( const css::uno::Reference< css::uno::XInterface >& _interface ) override
{ _aData.Interface = _interface; }
virtual void SAL_CALL setAny( const css::uno::Any& _any ) override
@@ -570,6 +588,8 @@ void Test_Impl::setValues( sal_Bool bBool,
double fDouble,
TestEnum eEnum,
const OUString& rStr,
+ sal_Int8 nByte2,
+ sal_Int16 nShort2,
const css::uno::Reference< css::uno::XInterface >& xTest,
const css::uno::Any& rAny,
const css::uno::Sequence<TestElement >& rSequence,
@@ -577,7 +597,7 @@ void Test_Impl::setValues( sal_Bool bBool,
{
assign( _aData,
bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny, rSequence );
+ eEnum, rStr, nByte2, nShort2, xTest, rAny, rSequence );
_aStructData = rStruct;
}
@@ -594,6 +614,8 @@ void Test_Impl::setValues( sal_Bool bBool,
double& fDouble,
TestEnum& eEnum,
OUString& rStr,
+ sal_Int8& nByte2,
+ sal_Int16& nShort2,
css::uno::Reference< css::uno::XInterface >& xTest,
css::uno::Any& rAny,
css::uno::Sequence<TestElement >& rSequence,
@@ -601,7 +623,7 @@ void Test_Impl::setValues( sal_Bool bBool,
{
assign( _aData,
bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny, rSequence );
+ eEnum, rStr, nByte2, nShort2, xTest, rAny, rSequence );
_aStructData = rStruct;
TestElement elem = rSequence[ 0 ];
@@ -624,6 +646,8 @@ void Test_Impl::setValues( sal_Bool bBool,
double& fDouble,
TestEnum& eEnum,
OUString& rStr,
+ sal_Int8& nByte2,
+ sal_Int16& nShort2,
css::uno::Reference< css::uno::XInterface >& xTest,
css::uno::Any& rAny,
css::uno::Sequence<TestElement >& rSequence,
@@ -642,6 +666,8 @@ void Test_Impl::setValues( sal_Bool bBool,
fDouble = _aData.Double;
eEnum = _aData.Enum;
rStr = _aData.String;
+ nByte2 = _aData.Byte2;
+ nShort2 = _aData.Short2;
xTest = _aData.Interface;
rAny = _aData.Any;
rSequence = _aData.Sequence;
diff --git a/testtools/source/bridgetest/idl/bridgetest.idl b/testtools/source/bridgetest/idl/bridgetest.idl
index 0649867ae29a..b40d46d0764f 100644
--- a/testtools/source/bridgetest/idl/bridgetest.idl
+++ b/testtools/source/bridgetest/idl/bridgetest.idl
@@ -50,7 +50,9 @@ struct TestSimple
boolean Bool;
char Char;
byte Byte;
+ byte Byte2;
short Short;
+ short Short2;
unsigned short UShort;
long Long;
unsigned long ULong;
@@ -240,6 +242,8 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface
[in] double fDouble,
[in] TestEnum eEnum,
[in] string aString,
+ [in] byte aByte2,
+ [in] short aShort2,
[in] com::sun::star::uno::XInterface xInterface,
[in] any aAny,
[in] sequence< TestElement > aSequence,
@@ -264,6 +268,8 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface
[inout] double fDouble,
[inout] TestEnum eEnum,
[inout] string aString,
+ [inout] byte aByte2,
+ [inout] short aShort2,
[inout] com::sun::star::uno::XInterface xInterface,
[inout] any aAny,
[inout] sequence< TestElement > aSequence,
@@ -285,6 +291,8 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface
[out] double fDouble,
[out] TestEnum eEnum,
[out] string aString,
+ [out] byte aByte2,
+ [out] short aShort2,
[out] com::sun::star::uno::XInterface xInterface,
[out] any aAny,
[out] sequence< TestElement > aSequence,
@@ -354,6 +362,8 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface
[attribute] double Double;
[attribute] TestEnum Enum;
[attribute] string String;
+ [attribute] byte Byte2;
+ [attribute] short Short2;
[attribute] com::sun::star::uno::XInterface Interface;
[attribute] any Any;
[attribute] sequence< TestElement > Sequence;