On Tue Jun 14 04:05:11 2022 +0000, **** wrote:
Zebediah Figura replied on the mailing list:
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.
I mean that, like the `GetRawInputBuffer` tests below you check an invalid size and ERROR_INVALID_PARAMETER error case, but on wow64, you don't and instead you check a valid size and the returned data.
I think you should check the same cases on all arch if possible, so invalid size and error on all arch (similarly to `GetRawInputBuffer`), then the valid case and data on all arch as well.