summaryrefslogtreecommitdiff
path: root/testtools
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-01-05 14:01:00 +0100
committerJens-Heiner Rechtien <hr@openoffice.org>2010-01-05 14:01:00 +0100
commit5da890e767cac2ea2214edafde01c2a5fcb53a09 (patch)
treeb77a190640348e2075544b676e7ae6818c512f86 /testtools
parenta53750306673c885b08586a51e74fb3b9a5366dc (diff)
parenta24c356d4b6dc6c38c11f3fd7dd55e105994f279 (diff)
CWS-TOOLING: integrate CWS cmcfixes68
Notes
split repo tag: testing_ooo/DEV300_m69
Diffstat (limited to 'testtools')
-rw-r--r--testtools/com/sun/star/comp/bridge/TestComponent.java4
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx28
-rw-r--r--testtools/source/bridgetest/cli/cli_cs_testobj.cs5
-rw-r--r--testtools/source/bridgetest/cppobj.cxx2
-rw-r--r--testtools/source/bridgetest/idl/bridgetest.idl5
5 files changed, 32 insertions, 12 deletions
diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java b/testtools/com/sun/star/comp/bridge/TestComponent.java
index 3a3c60b8146d..57582203fe2d 100644
--- a/testtools/com/sun/star/comp/bridge/TestComponent.java
+++ b/testtools/com/sun/star/comp/bridge/TestComponent.java
@@ -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;
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index 45edf5f53392..cf286c30d16f 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -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:
diff --git a/testtools/source/bridgetest/cli/cli_cs_testobj.cs b/testtools/source/bridgetest/cli/cli_cs_testobj.cs
index 2f1c9dde78f6..0801eb95274f 100644
--- a/testtools/source/bridgetest/cli/cli_cs_testobj.cs
+++ b/testtools/source/bridgetest/cli/cli_cs_testobj.cs
@@ -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
{
diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index 9a8a6508a069..f05bb8e1db2f 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -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; }
diff --git a/testtools/source/bridgetest/idl/bridgetest.idl b/testtools/source/bridgetest/idl/bridgetest.idl
index 206956755ee1..be54e4e9d07e 100644
--- a/testtools/source/bridgetest/idl/bridgetest.idl
+++ b/testtools/source/bridgetest/idl/bridgetest.idl
@@ -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;