summaryrefslogtreecommitdiff
path: root/testtools/source
diff options
context:
space:
mode:
Diffstat (limited to 'testtools/source')
-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/cppobj.cxx32
-rw-r--r--testtools/source/bridgetest/idl/bridgetest.idl10
4 files changed, 95 insertions, 12 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index ab4ac91bc96d..74af97d19ef9 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -136,6 +136,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!" );
@@ -152,6 +154,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);
}
@@ -187,6 +191,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 )
{
@@ -203,6 +208,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;
}
@@ -259,6 +266,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(
@@ -357,7 +366,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!");
@@ -370,7 +379,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
@@ -388,6 +397,8 @@ static bool performTest(
aSetData.Double,
aSetData.Enum,
aSetData.String,
+ aSetData.Byte2,
+ aSetData.Short2,
aSetData.Interface,
aSetData.Any,
aSetData.Sequence,
@@ -409,6 +420,8 @@ static bool performTest(
aRet.Double,
aRet.Enum,
aRet.String,
+ aRet.Byte2,
+ aRet.Short2,
aRet.Interface,
aRet.Any,
aRet.Sequence,
@@ -431,6 +444,8 @@ static bool performTest(
aRet.Double,
aRet.Enum,
aRet.String,
+ aRet.Byte2,
+ aRet.Short2,
aRet.Interface,
aRet.Any,
aRet.Sequence,
@@ -482,6 +497,8 @@ static bool performTest(
aRet.Double,
aRet.Enum,
aRet.String,
+ aRet.Byte2,
+ aRet.Short2,
aRet.Interface,
aRet.Any,
aRet.Sequence,
@@ -504,6 +521,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);
@@ -524,6 +543,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();
@@ -684,19 +705,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 cec2a2a4038d..847e04cf93ad 100644
--- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
+++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
@@ -194,6 +194,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!" );
@@ -210,6 +212,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)));
}
@@ -221,6 +225,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 )
{
@@ -237,6 +242,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;
}
@@ -248,13 +255,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;
}
@@ -291,6 +299,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;
@@ -382,6 +392,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
@@ -399,6 +410,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);
@@ -408,6 +421,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
@@ -425,6 +439,8 @@ static bool performTest(XBridgeTest* xLBT)
aSetData->Double,
aSetData->Enum,
aSetData->String,
+ aSetData->Byte2,
+ aSetData->Short2,
aSetData->Interface,
aSetData->Any,
aSetData->Sequence,
@@ -447,6 +463,8 @@ static bool performTest(XBridgeTest* xLBT)
& aRet->Double,
& aRet->Enum,
& aRet->String,
+ & aRet->Byte2,
+ & aRet->Short2,
& aRet->Interface,
& aRet->Any,
& aRet->Sequence,
@@ -469,6 +487,8 @@ static bool performTest(XBridgeTest* xLBT)
& aRet->Double,
& aRet->Enum,
& aRet->String,
+ & aRet->Byte2,
+ & aRet->Short2,
& aRet->Interface,
& aRet->Any,
& aRet->Sequence,
@@ -501,6 +521,8 @@ static bool performTest(XBridgeTest* xLBT)
& aRet->Double,
& aRet->Enum,
& aRet->String,
+ & aRet->Byte2,
+ & aRet->Short2,
& aRet->Interface,
& aRet->Any,
& aRet->Sequence,
@@ -522,6 +544,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;
@@ -543,6 +567,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;
@@ -629,15 +655,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/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index b719cdd6db15..6ff85fc2ed6c 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;
}
@@ -181,6 +185,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,
@@ -199,6 +205,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,
@@ -217,6 +225,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,
@@ -268,6 +278,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
@@ -303,6 +317,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
@@ -567,6 +585,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,
@@ -574,7 +594,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;
}
@@ -591,6 +611,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,
@@ -598,7 +620,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 ];
@@ -621,6 +643,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,
@@ -639,6 +663,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;