[PATCH 0/4] MR233: win32u: Partially move raw input APIs.
Zebediah Figura
zfigura at codeweavers.com
Mon Jun 13 23:05:06 CDT 2022
On 6/13/22 03:27, Rémi Bernon (@rbernon) wrote:
> Rémi Bernon (@rbernon) commented about dlls/user32/tests/input.c:
>> + ok(count == ~0u, "GetRawInputData returned %d\n", count);
>> + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputData returned %08lx\n", GetLastError());
>> + }
>> + else if (is_wow64)
>> + {
>> + count = GetRawInputData((HRAWINPUT)lparam, RID_INPUT, &ri, &size, sizeof(RAWINPUTHEADER64));
>> + todo_wine ok(count == sizeof(ri), "GetRawInputData returned %d\n", count);
>> + ok(ri.data.mouse.lLastX == 6, "Unexpected rawinput data: %ld\n", ri.data.mouse.lLastX);
>> + todo_wine ok(GetLastError() == 0xdeadbeef, "GetRawInputData returned %08lx\n", GetLastError());
>> + }
>> + else
>> + {
>> + count = GetRawInputData((HRAWINPUT)lparam, RID_INPUT, &ri, &size, sizeof(RAWINPUTHEADER64));
>> + ok(count == ~0u, "GetRawInputData returned %d\n", count);
>> + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetRawInputData returned %08lx\n", GetLastError());
>> + }
> It feels a bit unbalanced to test invalid cases at the same time as a valid case depending on the arch. Could we have instead a test for the invalid sizes, and the another one with valid size?
I don't understand what you mean by this. Only one of these three tests
makes sense, and on mutually exclusive architectures.
I could separate the if/elif/else into three separate if blocks, but I
doubt that's what you mean.
More information about the wine-devel
mailing list