Module: wine Branch: master Commit: 39d75dfba422d1a1a1e4f3dd0290b22b360af7fe URL: http://source.winehq.org/git/wine.git/?a=commit;h=39d75dfba422d1a1a1e4f3dd02...
Author: Alexandre Julliard julliard@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;