Re: [PATCH 1/3] user32/tests: Added client-side raw input function tests (try 4)

2011-06-20 Thread Vitaliy Margolen

On 06/20/2011 02:55 AM, Vincas Miliƫnas wrote:

Fixed function name typo, compiler warnings, code style issues in a
fragment of new code and incorrect usage of wcslen in the tests instead
of lstrlenW after previous changes. My apologies :).




+#define DEADBEEF 0xdeadbeef

Please don't do this. Just explicitly use 0xdeadbeef everywhere.


+todo_wine ok(ret == 0 && GetLastError() == DEADBEEF && count >= 1, "Given (NULL, 
&count, sizeof), "
+"GetRawInputDeviceList should return the number of raw input 
devices\n");

If call succeeded you don't need to check last error.


+device_list = malloc(count * sizeof(RAWINPUTDEVICELIST));

Don't use malloc/free in Wine. Use HeapAlloc / HeapFree.


+ret = pGetRawInputDeviceList(device_list, &count2, 
sizeof(RAWINPUTDEVICELIST));
+todo_wine ok(ret == (UINT)-1 && GetLastError() == ERROR_INSUFFICIENT_BUFFER 
&& count2 == count,
+"Given (device_list, &count2 = 0, sizeof), GetRawInputDeviceList should 
return an error\n");
If something fails it's nice to know the error code - you need to print it. 
For that you need to more GetLastError outside of ok() function call. See 
other tests as example.



+static BOOL get_raw_input_data_wnd_proc_was_called = FALSE;
Static variables automatically set to 0 at the start. You don't need to do 
it explicitly.


Vitaliy.




Re: [PATCH 1/3] user32/tests: Added client-side raw input function tests (try 4)

2011-06-20 Thread Marvin
Hi,

While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
http://testbot.winehq.org/JobDetails.pl?Key=11841

Your paranoid android.


=== W7PROX64 (64 bit input) ===
No test summary line found