Alexandre Julliard : rpcrt4/tests: Fix the marshalling test for Win9x.

Alexandre Julliard julliard at winehq.org
Fri Jun 19 08:27:11 CDT 2009


Module: wine
Branch: master
Commit: 39d75dfba422d1a1a1e4f3dd0290b22b360af7fe
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=39d75dfba422d1a1a1e4f3dd0290b22b360af7fe

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jun 19 12:49:20 2009 +0200

rpcrt4/tests: Fix the marshalling test for Win9x.

---

 dlls/rpcrt4/tests/ndr_marshall.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index d8ba912..2aa8146 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -211,8 +211,16 @@ static void test_pointer_marshal(const unsigned char *formattypes,
 
     ptr = NdrPointerMarshall( &StubMsg,  memsrc, formattypes );
     ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr);
-    ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen);
-    ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled\n", msgpfx);
+    if (srcsize == 8 && wiredatalen == 16 && StubMsg.Buffer - StubMsg.BufferStart == 12)
+    {
+        /* win9x doesn't align 8-byte types properly */
+        wiredatalen = 12;
+    }
+    else
+    {
+        ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen);
+        ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled\n", msgpfx);
+    }
 
     StubMsg.Buffer = StubMsg.BufferStart;
     StubMsg.MemorySize = 0;




More information about the wine-cvs mailing list