Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/mesh.c:
frame_hier = NULL; }
+ hr = D3DXLoadMeshHierarchyFromXInMemory(framed_xfile2, sizeof(framed_xfile2) - 1, + D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); + if (SUCCEEDED(hr)) { + D3DXMESHCONTAINER *container = frame_hier->pMeshContainer; + + ok(!strcmp(frame_hier->Name, "Box01"), "Expected '', got '%s'\n", frame_hier->Name); + ok(container == NULL, "Expected NULL, got %p\n", container); + + hr = D3DXFrameDestroy(frame_hier, &alloc_hier); + ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr); + frame_hier = NULL; + }
It would be best if we followed the current style conventions in new code instead of adding more code using the old ones. Specifically: - Just an "Unexpected hr %#lx.\n" (or "name", or whatever the message calls for) is an appropriate ok() message - No need for the if (SUCCEEDED(hr)) {}, this is never supposed to fail - '{' on its own line - !container instead of == NULL -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4031#note_47922