diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-12-09 11:19:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-12-09 11:19:10 +0000 |
commit | 85cc920f24f6f8e580a5f390d8077bb6bccc0ae9 (patch) | |
tree | 466ac898fb6c931b65e46d9e93892f169dafaba5 /testtools | |
parent | c88463b812319ff5ea8cc5587df0e8cd7b7ad897 (diff) |
add a Mixed Float And Integer struct return test
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 | 14 |
5 files changed, 31 insertions, 0 deletions
diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java b/testtools/com/sun/star/comp/bridge/TestComponent.java index ed91f4c9cb11..25e3b3a7099a 100644 --- a/testtools/com/sun/star/comp/bridge/TestComponent.java +++ b/testtools/com/sun/star/comp/bridge/TestComponent.java @@ -49,6 +49,7 @@ import test.testtools.bridgetest.MediumStruct; import test.testtools.bridgetest.BigStruct; import test.testtools.bridgetest.TwoFloats; import test.testtools.bridgetest.FourFloats; +import test.testtools.bridgetest.MixedFloatAndInteger; import test.testtools.bridgetest.XBridgeTest; import test.testtools.bridgetest.XBridgeTest2; import test.testtools.bridgetest.XCurrentContextChecker; @@ -497,6 +498,10 @@ public class TestComponent { return i_Struct; } + public MixedFloatAndInteger echoMixedFloatAndInteger( MixedFloatAndInteger i_Struct) throws com.sun.star.uno.RuntimeException { + return i_Struct; + } + public int testPPCAlignment( long l1, long l2, int i1, long l3, int i2 ) throws com.sun.star.uno.RuntimeException { return i2; } diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 1e1e85a52ac2..4168fd3d62a1 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -558,6 +558,11 @@ static sal_Bool performTest( bRet = check( memcmp(&aIn, &aOut, sizeof(FourFloats)) == 0, "four floats struct test" ) && bRet; } { + MixedFloatAndInteger aIn(7.7f, 8); + MixedFloatAndInteger aOut = xLBT->echoMixedFloatAndInteger(aIn); + bRet = check( memcmp(&aIn, &aOut, sizeof(MixedFloatAndInteger)) == 0, "mixed float and integer 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 5cd6de15cf16..c88e4d3c4589 100644 --- a/testtools/source/bridgetest/cli/cli_cs_testobj.cs +++ b/testtools/source/bridgetest/cli/cli_cs_testobj.cs @@ -249,6 +249,11 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2 return arg; } + public MixedFloatAndInteger echoMixedFloatAndInteger(/*[in]*/MixedFloatAndInteger 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 eb1dbb5d8cdc..1c8139bfb7fb 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -225,6 +225,8 @@ public: { return rStruct; } virtual FourFloats SAL_CALL echoFourFloats(const FourFloats& rStruct) throw(com::sun::star::uno::RuntimeException) { return rStruct; } + virtual MixedFloatAndInteger SAL_CALL echoMixedFloatAndInteger(const MixedFloatAndInteger& 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 906854768d2d..e38a2f2e0b7a 100644 --- a/testtools/source/bridgetest/idl/bridgetest.idl +++ b/testtools/source/bridgetest/idl/bridgetest.idl @@ -120,6 +120,15 @@ struct FourFloats float d; }; /** + * Small struct with mixed float and integers. + * Should return in registers on BSDs/MACOSx + */ +struct MixedFloatAndInteger +{ + float a; + long b; +}; +/** * complex types adding string, inteface, any */ struct TestElement : TestSimple @@ -281,6 +290,11 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface FourFloats echoFourFloats( [in] FourFloats aStruct ); /** + * register return test 6 + */ + MixedFloatAndInteger echoMixedFloatAndInteger( [in] MixedFloatAndInteger aStruct ); + + /** * PPC Alignment test (#i107182#) */ long testPPCAlignment( [in] hyper l1, [in] hyper l2, [in] long i1, [in] hyper l3, [in] long i2 ); |