sync rostests to r44455
[reactos.git] / rostests / winetests / rpcrt4 / ndr_marshall.c
index 2aa8146..565b677 100644 (file)
@@ -218,8 +218,8 @@ static void test_pointer_marshal(const unsigned char *formattypes,
     }
     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);
+    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;
@@ -307,24 +307,24 @@ todo_wine {
         /* again pass address of NULL ptr, but pretend we're a server */
         if (0)  /* crashes on Win9x and NT4 */
         {
-            mem = NULL;
-            StubMsg.Buffer = StubMsg.BufferStart;
-            StubMsg.IsClient = 0;
-            ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 );
-            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
-                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: incorrectly 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.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize);
-            if (formattypes[2] != 0xd /* FC_ENUM16 */) {
-                ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
-                my_alloc_called = 0;
-            }
+        mem = NULL;
+        StubMsg.Buffer = StubMsg.BufferStart;
+        StubMsg.IsClient = 0;
+        ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 );
+        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
+            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: incorrectly 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.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize);
+        if (formattypes[2] != 0xd /* FC_ENUM16 */) {
+            ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
+            my_alloc_called = 0;
         }
     }
+    }
     HeapFree(GetProcessHeap(), 0, mem_orig);
     HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart);
 }
@@ -773,16 +773,16 @@ static void test_simple_struct_marshal(const unsigned char *formattypes,
 
     if (0)  /* crashes on Win9x and NT4 */
     {
-        mem = NULL;
-        StubMsg.IsClient = 0;
-        StubMsg.Buffer = StubMsg.BufferStart;
+    mem = NULL;
+    StubMsg.IsClient = 0;
+    StubMsg.Buffer = StubMsg.BufferStart;
         ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, FALSE );
-        ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr);
-        ok(mem == StubMsg.BufferStart, "%s: mem not equal buffer\n", msgpfx);
-        ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx);
-        ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
-        my_alloc_called = 0;
-        ok(StubMsg.MemorySize == 0, "%s: memorysize touched in unmarshal\n", msgpfx);
+    ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr);
+    ok(mem == StubMsg.BufferStart, "%s: mem not equal buffer\n", msgpfx);
+    ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx);
+    ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
+    my_alloc_called = 0;
+    ok(StubMsg.MemorySize == 0, "%s: memorysize touched in unmarshal\n", msgpfx);
     }
 
     /*** now must_alloc is true ***/
@@ -1011,7 +1011,7 @@ static void test_simple_struct(void)
     else
         *(unsigned int *)wiredata = (UINT_PTR)&ps1;
     test_pointer_marshal(fmtstr_pointer_struct, &ps1, 17, wiredata, 21, ps1_cmp, 2, "pointer_struct");
-}
+    }
 
 static void test_fullpointer_xlat(void)
 {
@@ -1381,7 +1381,7 @@ static void test_ndr_allocate(void)
             }
         }
         else win_skip("v1 mem list format\n");
-    }
+            }
     /* NdrFree isn't exported so we can't test free'ing */
 }