dinput/tests: Differentiate missing from broken HID reports.
This commit is contained in:
parent
6c44228c1f
commit
96b823c2d4
3 changed files with 9 additions and 8 deletions
|
@ -131,7 +131,7 @@ static void expect_queue_reset( struct expect_queue *queue, void *buffer, unsign
|
|||
while (tmp != missing_end)
|
||||
{
|
||||
winetest_push_context( "%s expect[%Id]", context, tmp - missing );
|
||||
if (tmp->broken)
|
||||
if (tmp->broken_id)
|
||||
{
|
||||
todo_wine_if( tmp->todo )
|
||||
win_skip( "broken (code %#lx id %u len %u)\n", tmp->code, tmp->report_id, tmp->report_len );
|
||||
|
@ -251,8 +251,9 @@ static void expect_queue_next( struct expect_queue *queue, ULONG code, HID_XFER_
|
|||
tmp = queue->pos;
|
||||
while (tmp < queue->end)
|
||||
{
|
||||
BOOL is_missing = tmp->broken_id == (BYTE)-1;
|
||||
if (winetest_platform_is_wine && !tmp->todo) break;
|
||||
if (!winetest_platform_is_wine && !tmp->broken && !tmp->wine_only) break;
|
||||
if (!winetest_platform_is_wine && !is_missing && !tmp->wine_only) break;
|
||||
if (tmp->code == code && tmp->report_id == id && tmp->report_len == len &&
|
||||
(!compare_buf || RtlCompareMemory( tmp->report_buf, buf, len ) == len))
|
||||
break;
|
||||
|
@ -303,7 +304,7 @@ static void expect_queue_next( struct expect_queue *queue, ULONG code, HID_XFER_
|
|||
while (tmp != missing_end)
|
||||
{
|
||||
winetest_push_context( "%s expect[%Id]", context, tmp - missing );
|
||||
if (tmp->broken)
|
||||
if (tmp->broken_id)
|
||||
{
|
||||
todo_wine_if( tmp->todo )
|
||||
win_skip( "broken (code %#lx id %u len %u)\n", tmp->code, tmp->report_id, tmp->report_len );
|
||||
|
|
|
@ -56,7 +56,7 @@ struct hid_expect
|
|||
DWORD ret_length;
|
||||
DWORD ret_status;
|
||||
BYTE todo; /* missing on wine */
|
||||
BYTE broken; /* missing on some win versions */
|
||||
BYTE broken_id; /* different or missing (-1) report on some win versions */
|
||||
BYTE wine_only;
|
||||
BYTE report_id;
|
||||
BYTE report_len;
|
||||
|
|
|
@ -1048,7 +1048,7 @@ static void test_hidp_get_input( HANDLE file, int report_id, ULONG report_len, P
|
|||
struct hid_expect broken_expect =
|
||||
{
|
||||
.code = IOCTL_HID_GET_INPUT_REPORT,
|
||||
.broken = TRUE,
|
||||
.broken_id = -1,
|
||||
.report_len = report_len - 1,
|
||||
.report_buf =
|
||||
{
|
||||
|
@ -1142,7 +1142,7 @@ static void test_hidp_get_feature( HANDLE file, int report_id, ULONG report_len,
|
|||
struct hid_expect broken_expect =
|
||||
{
|
||||
.code = IOCTL_HID_GET_FEATURE,
|
||||
.broken = TRUE,
|
||||
.broken_id = -1,
|
||||
.report_len = report_len - 1,
|
||||
.report_buf =
|
||||
{
|
||||
|
@ -1240,7 +1240,7 @@ static void test_hidp_set_feature( HANDLE file, int report_id, ULONG report_len,
|
|||
struct hid_expect broken_expect =
|
||||
{
|
||||
.code = IOCTL_HID_SET_FEATURE,
|
||||
.broken = TRUE,
|
||||
.broken_id = -1,
|
||||
.report_len = report_len - 1,
|
||||
.report_buf =
|
||||
{
|
||||
|
@ -1341,7 +1341,7 @@ static void test_hidp_set_output( HANDLE file, int report_id, ULONG report_len,
|
|||
struct hid_expect broken_expect =
|
||||
{
|
||||
.code = IOCTL_HID_SET_OUTPUT_REPORT,
|
||||
.broken = TRUE,
|
||||
.broken_id = -1,
|
||||
.report_len = report_len - 1,
|
||||
.report_buf = {0x5a,0x5a},
|
||||
.ret_length = 3,
|
||||
|
|
Loading…
Add table
Reference in a new issue