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

cmcfixes68: #i107182# ppc fix argument passing in a rare case

üst a0ea9187
......@@ -495,6 +495,10 @@ public class TestComponent {
return i_Struct;
}
public int testPPCAlignment( long l1, long l2, int i1, long l3, int i2 ) throws com.sun.star.uno.RuntimeException {
return i2;
}
// Attributes
public boolean getBool() throws com.sun.star.uno.RuntimeException {
return _bool;
......
......@@ -535,24 +535,28 @@ static sal_Bool performTest(
bRet = check( equals( aData, aRet ) && equals( aData, aRet2 ) , "struct comparison test") && bRet;
{
SmallStruct aIn(1, 2);
SmallStruct aOut = xLBT->echoSmallStruct(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(SmallStruct)) == 0, "small struct test" ) && bRet;
SmallStruct aIn(1, 2);
SmallStruct aOut = xLBT->echoSmallStruct(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(SmallStruct)) == 0, "small struct test" ) && bRet;
}
{
MediumStruct aIn(1, 2, 3, 4);
MediumStruct aOut = xLBT->echoMediumStruct(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(MediumStruct)) == 0, "medium struct test" ) && bRet;
MediumStruct aIn(1, 2, 3, 4);
MediumStruct aOut = xLBT->echoMediumStruct(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(MediumStruct)) == 0, "medium struct test" ) && bRet;
}
{
BigStruct aIn(1, 2, 3, 4, 5, 6, 7, 8);
BigStruct aOut = xLBT->echoBigStruct(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(BigStruct)) == 0, "big struct test" ) && bRet;
BigStruct aIn(1, 2, 3, 4, 5, 6, 7, 8);
BigStruct aOut = xLBT->echoBigStruct(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(BigStruct)) == 0, "big struct test" ) && bRet;
}
{
AllFloats aIn(1.1f, 2.2f, 3.3f, 4.4f);
AllFloats aOut = xLBT->echoAllFloats(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(AllFloats)) == 0, "all floats struct test" ) && bRet;
AllFloats aIn(1.1f, 2.2f, 3.3f, 4.4f);
AllFloats aOut = xLBT->echoAllFloats(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(AllFloats)) == 0, "all floats struct test" ) && bRet;
}
{
sal_Int32 i2 = xLBT->testPPCAlignment( 0, 0, 0, 0, 0xbeaf );
bRet = check( i2 == 0xbeaf, "ppc-style alignment test" ) && bRet;
}
// Test extended attributes that raise exceptions:
......
......@@ -247,6 +247,11 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2
return arg;
}
public int testPPCAlignment( long l1, long l2, int i1, long l3, int i2 )
{
return i2;
}
// Attributes
public bool Bool
{
......
......@@ -225,6 +225,8 @@ public:
{ return rStruct; }
virtual AllFloats SAL_CALL echoAllFloats(const AllFloats& 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; }
virtual sal_Bool SAL_CALL getBool() throw(com::sun::star::uno::RuntimeException)
{ return _aData.Bool; }
......
......@@ -269,6 +269,11 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface
*/
AllFloats echoAllFloats( [in] AllFloats aStruct );
/**
* register return test 4 (i107182)
*/
long testPPCAlignment( [in] hyper l1, [in] hyper l2, [in] long i1, [in] hyper l3, [in] long i2 );
[attribute] boolean Bool;
[attribute] byte Byte;
[attribute] char Char;
......
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