diff options
Diffstat (limited to 'testtools/source')
-rw-r--r-- | testtools/source/bridgetest/bridgetest.cxx | 5 | ||||
-rw-r--r-- | testtools/source/bridgetest/cli/cli_cs_testobj.cs | 5 | ||||
-rw-r--r-- | testtools/source/bridgetest/cppobj.cxx | 2 | ||||
-rw-r--r-- | testtools/source/bridgetest/idl/bridgetest.idl | 15 |
4 files changed, 27 insertions, 0 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 4168fd3d62a1..74f89469b077 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -563,6 +563,11 @@ static sal_Bool performTest( bRet = check( memcmp(&aIn, &aOut, sizeof(MixedFloatAndInteger)) == 0, "mixed float and integer struct test" ) && bRet; } { + ThreeByteStruct aIn(9, 10, 11); + ThreeByteStruct aOut = xLBT->echoThreeByteStruct(aIn); + bRet = check( memcmp(&aIn, &aOut, sizeof(ThreeByteStruct)) == 0, "three byte struct test" ) && bRet; + } + { sal_Int32 i2 = xLBT->testPPCAlignment( 0, 0, 0, 0, 0xbeaf ); bRet = check( i2 == 0xbeaf, "ppc-style alignment test" ) && bRet; } diff --git a/testtools/source/bridgetest/cli/cli_cs_testobj.cs b/testtools/source/bridgetest/cli/cli_cs_testobj.cs index c88e4d3c4589..246d3e1898a6 100644 --- a/testtools/source/bridgetest/cli/cli_cs_testobj.cs +++ b/testtools/source/bridgetest/cli/cli_cs_testobj.cs @@ -254,6 +254,11 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2 return arg; } + public ThreeByteStruct echoThreeByteStruct(/*[in]*/ThreeByteStruct arg) + { + return arg; + } + public int testPPCAlignment( long l1, long l2, int i1, long l3, int i2 ) { return i2; diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index 1c8139bfb7fb..d765e14d33d4 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -227,6 +227,8 @@ public: { return rStruct; } virtual MixedFloatAndInteger SAL_CALL echoMixedFloatAndInteger(const MixedFloatAndInteger& rStruct) throw(com::sun::star::uno::RuntimeException) { return rStruct; } + virtual ThreeByteStruct SAL_CALL echoThreeByteStruct(const ThreeByteStruct& rStruct) throw(com::sun::star::uno::RuntimeException) + { return rStruct; } virtual sal_Int32 SAL_CALL testPPCAlignment( sal_Int64, sal_Int64, sal_Int32, sal_Int64, sal_Int32 i2 ) throw(com::sun::star::uno::RuntimeException) { return i2; } diff --git a/testtools/source/bridgetest/idl/bridgetest.idl b/testtools/source/bridgetest/idl/bridgetest.idl index e38a2f2e0b7a..82db3207cfd3 100644 --- a/testtools/source/bridgetest/idl/bridgetest.idl +++ b/testtools/source/bridgetest/idl/bridgetest.idl @@ -129,6 +129,16 @@ struct MixedFloatAndInteger long b; }; /** + * Small struct with three bytes. Should *not* return in registers on + * BSDs/MACOSx + */ +struct ThreeByteStruct +{ + byte a; + byte b; + byte c; +}; +/** * complex types adding string, inteface, any */ struct TestElement : TestSimple @@ -295,6 +305,11 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface MixedFloatAndInteger echoMixedFloatAndInteger( [in] MixedFloatAndInteger aStruct ); /** + * register return test 7 + */ + ThreeByteStruct echoThreeByteStruct( [in] ThreeByteStruct aStruct ); + + /** * PPC Alignment test (#i107182#) */ long testPPCAlignment( [in] hyper l1, [in] hyper l2, [in] long i1, [in] hyper l3, [in] long i2 ); |