Commit 41713097 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Fix the tests for up_enum16.

It is different to the other base types as it has a different size on the wire to in memory, so it can't just be set to the buffer when unmarshalling.
parent 0f9e5689
...@@ -247,16 +247,21 @@ todo_wine { ...@@ -247,16 +247,21 @@ todo_wine {
StubMsg.IsClient = 0; StubMsg.IsClient = 0;
ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 ); ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 );
ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr);
if (formattypes[2] == 0xd /* FC_ENUM16 */)
ok(mem != StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem points to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart);
else
todo_wine { todo_wine {
ok(mem == StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem doesn't point to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart); ok(mem == StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem doesn't point to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart);
} }
ok(!cmp(mem, memsrc, size), "%s: incorrecly unmarshaled\n", msgpfx); ok(!cmp(mem, memsrc, size), "%s: incorrecly unmarshaled\n", msgpfx);
ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen);
ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize);
if (formattypes[2] != 0xd /* FC_ENUM16 */) {
todo_wine { todo_wine {
ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
my_alloc_called = 0; my_alloc_called = 0;
} }
}
} }
HeapFree(GetProcessHeap(), 0, mem_orig); HeapFree(GetProcessHeap(), 0, mem_orig);
HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart); HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart);
......
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