[PATCH 1/3] user32/tests: Added client-side raw input function tests (try 5 resend)
André Hentschel
nerv at dawncrow.de
Sun Jun 26 12:24:51 CDT 2011
Am 26.06.2011 18:41, schrieb Vincas Miliūnas:
> Done - http://source.winehq.org/patches/data/75756
>
> +static void test_raw_input_functions(void)
> +{
> + if (pGetRawInputData)
> + test_get_raw_input_data();
> + else
> + win_skip("GetRawInputData is not available\n");
> +
> + if (pRegisterRawInputDevices)
> + test_register_raw_input_devices();
> + else
> + win_skip("RegisterRawInputDevices is not available\n");
> +
> + if (pGetRawInputBuffer)
> + test_get_raw_input_buffer();
> + else
> + win_skip("GetRawInputBuffer is not available\n");
> +
> + if (pDefRawInputProc)
> + test_def_raw_input_proc();
> + else
> + win_skip("DefRawInputProc is not available\n");
> +
> + if (pGetRawInputDeviceList)
> + test_get_raw_input_device_list();
> + else
> + win_skip("GetRawInputDeviceList is not available\n");
> +
> + if (pGetRawInputDeviceInfoA && pGetRawInputDeviceList)
> + test_get_raw_input_device_info_a();
> + else
> + win_skip("GetRawInputDeviceInfoA and pGetRawInputDeviceList are not available\n");
> +
> + if (pGetRawInputDeviceInfoW && pGetRawInputDeviceList)
> + test_get_raw_input_device_info_w();
> + else
> + win_skip("GetRawInputDeviceInfoW and pGetRawInputDeviceList are not available\n");
> +
> + if (pGetRegisteredRawInputDevices && pRegisterRawInputDevices)
> + test_get_registered_raw_input_devices();
> + else
> + win_skip("GetRegisteredRawInputDevices and pRegisterRawInputDevices are not available\n");
> +
> + if (pRegisterRawInputDevices && pGetRawInputData && pDefRawInputProc && pGetRawInputBuffer && pSendInput)
> + test_get_raw_input_data_simulation();
> + else
> + win_skip("Functions required to perform raw input simulation are not available\n");
> +}
1.)
No, i thought about something like:
static void test_get_raw_input_data_simulation(void)
{
HWND hWnd;
MSG msg;
WNDCLASSA wclass;
HANDLE hInstance = GetModuleHandleA( NULL );
BOOL ret;
INPUT inputs[2];
UINT timer, size, ret2;
RAWINPUT *raw;
if(!pGetRawInputData)
{
win_skip( "some reason\n" );
return;
}
wclass.lpszClassName = "GetRawInputDataTestClass";
....
2.)
Why does patch 3/3 not remove todo_wines from the test?
3.)
I'm not sure about the way you splitted the patches. Splitting is good and sending tests first is often a good idea, but in 2/3 you introduce dead code which only later get's used in 3/3.
Maybe you should split per function if possible.
--
Best Regards, André Hentschel
More information about the wine-devel
mailing list