Kaydet (Commit) c88463b8 authored tarafından Caolán McNamara's avatar Caolán McNamara

add a twoFloats return test

üst 7bdc8619
......@@ -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;
}
......
......@@ -547,6 +547,11 @@ static sal_Bool performTest(
BigStruct aOut = xLBT->echoBigStruct(aIn);
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);
......
......@@ -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;
......
......@@ -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)
......
......@@ -100,6 +100,15 @@ struct BigStruct
hyper g;
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
*/
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment