diff options
Diffstat (limited to 'testtools')
-rw-r--r-- | testtools/com/sun/star/comp/bridge/TestComponent.java | 5 | ||||
-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 | 16 |
5 files changed, 32 insertions, 1 deletions
diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java b/testtools/com/sun/star/comp/bridge/TestComponent.java index ecab1951c753..ed91f4c9cb11 100644 --- a/testtools/com/sun/star/comp/bridge/TestComponent.java +++ b/testtools/com/sun/star/comp/bridge/TestComponent.java @@ -47,6 +47,7 @@ import test.testtools.bridgetest.TestStruct; import test.testtools.bridgetest.SmallStruct; import test.testtools.bridgetest.MediumStruct; import test.testtools.bridgetest.BigStruct; +import test.testtools.bridgetest.TwoFloats; import test.testtools.bridgetest.FourFloats; import test.testtools.bridgetest.XBridgeTest; import test.testtools.bridgetest.XBridgeTest2; @@ -488,6 +489,10 @@ public class TestComponent { return i_Struct; } + public TwoFloats echoTwoFloats( TwoFloats i_Struct) throws com.sun.star.uno.RuntimeException { + return i_Struct; + } + public FourFloats echoFourFloats( FourFloats i_Struct) throws com.sun.star.uno.RuntimeException { return i_Struct; } diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 9cc323de9343..1e1e85a52ac2 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -548,6 +548,11 @@ static sal_Bool performTest( bRet = check( memcmp(&aIn, &aOut, sizeof(BigStruct)) == 0, "big struct test" ) && bRet; } { + TwoFloats aIn(1.1f, 2.2f); + TwoFloats aOut = xLBT->echoTwoFloats(aIn); + bRet = check( memcmp(&aIn, &aOut, sizeof(TwoFloats)) == 0, "two floats struct test" ) && bRet; + } + { FourFloats aIn(3.3f, 4.4f, 5.5f, 6.6f); FourFloats aOut = xLBT->echoFourFloats(aIn); bRet = check( memcmp(&aIn, &aOut, sizeof(FourFloats)) == 0, "four floats struct test" ) && bRet; diff --git a/testtools/source/bridgetest/cli/cli_cs_testobj.cs b/testtools/source/bridgetest/cli/cli_cs_testobj.cs index a1064d81db8c..5cd6de15cf16 100644 --- a/testtools/source/bridgetest/cli/cli_cs_testobj.cs +++ b/testtools/source/bridgetest/cli/cli_cs_testobj.cs @@ -239,6 +239,11 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2 return arg; } + public TwoFloats echoTwoFloats(/*[in]*/TwoFloats arg) + { + return arg; + } + public FourFloats echoFourFloats(/*[in]*/FourFloats arg) { return arg; diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index a6188668aa5e..eb1dbb5d8cdc 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -221,6 +221,8 @@ public: { return rStruct; } virtual BigStruct SAL_CALL echoBigStruct(const BigStruct& rStruct) throw(com::sun::star::uno::RuntimeException) { return rStruct; } + virtual TwoFloats SAL_CALL echoTwoFloats(const TwoFloats& rStruct) throw(com::sun::star::uno::RuntimeException) + { return rStruct; } virtual FourFloats SAL_CALL echoFourFloats(const FourFloats& 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) diff --git a/testtools/source/bridgetest/idl/bridgetest.idl b/testtools/source/bridgetest/idl/bridgetest.idl index b8b2ef385c34..906854768d2d 100644 --- a/testtools/source/bridgetest/idl/bridgetest.idl +++ b/testtools/source/bridgetest/idl/bridgetest.idl @@ -101,6 +101,15 @@ struct BigStruct hyper h; }; /** + * two floats, BSDs/MacOSX on intel handle returning small + * structs differently than Linux + */ +struct TwoFloats +{ + float a; + float b; +}; +/** * all floats, ia64 handles them specially */ struct FourFloats @@ -264,10 +273,15 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface /** * register return test 4 */ + TwoFloats echoTwoFloats( [in] TwoFloats aStruct ); + + /** + * register return test 5 + */ FourFloats echoFourFloats( [in] FourFloats aStruct ); /** - * register return test 4 (i107182) + * PPC Alignment test (#i107182#) */ long testPPCAlignment( [in] hyper l1, [in] hyper l2, [in] long i1, [in] hyper l3, [in] long i2 ); |