Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
612c1b66
Commit
612c1b66
authored
Jun 16, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe/tests: Add some HidP_GetData tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
934451f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+43
-0
No files found.
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
612c1b66
...
...
@@ -1775,6 +1775,18 @@ static void test_hidp(HANDLE file, int report_id)
.
CollectionType
=
2
,
},
};
static
const
HIDP_DATA
expect_data
[]
=
{
{
.
DataIndex
=
0
,
},
{
.
DataIndex
=
1
,
},
{
.
DataIndex
=
5
,
.
RawValue
=
1
,
},
{
.
DataIndex
=
7
,
.
RawValue
=
1
,
},
{
.
DataIndex
=
30
,
},
{
.
DataIndex
=
31
,
},
{
.
DataIndex
=
32
,
.
RawValue
=
0xfeedcafe
,
},
{
.
DataIndex
=
37
,
.
RawValue
=
1
,
},
{
.
DataIndex
=
39
,
.
RawValue
=
1
,
},
};
HIDP_LINK_COLLECTION_NODE
collections
[
16
];
PHIDP_PREPARSED_DATA
preparsed_data
;
...
...
@@ -1784,6 +1796,7 @@ static void test_hidp(HANDLE file, int report_id)
char
buffer
[
200
],
report
[
200
];
DWORD
collection_count
;
DWORD
waveform_list
;
HIDP_DATA
data
[
32
];
USAGE
usages
[
16
];
NTSTATUS
status
;
HIDP_CAPS
caps
;
...
...
@@ -2397,6 +2410,36 @@ static void test_hidp(HANDLE file, int report_id)
ok
(
usage_and_pages
[
3
].
Usage
==
4
,
"got usage_and_pages[3] Usage %x, expected %x
\n
"
,
usage_and_pages
[
3
].
Usage
,
4
);
value
=
HidP_MaxDataListLength
(
HidP_Feature
+
1
,
preparsed_data
);
ok
(
value
==
0
,
"HidP_MaxDataListLength(HidP_Feature + 1) returned %d, expected %d
\n
"
,
value
,
0
);
value
=
HidP_MaxDataListLength
(
HidP_Input
,
preparsed_data
);
todo_wine
ok
(
value
==
50
,
"HidP_MaxDataListLength(HidP_Input) returned %d, expected %d
\n
"
,
value
,
50
);
value
=
HidP_MaxDataListLength
(
HidP_Output
,
preparsed_data
);
ok
(
value
==
0
,
"HidP_MaxDataListLength(HidP_Output) returned %d, expected %d
\n
"
,
value
,
0
);
value
=
HidP_MaxDataListLength
(
HidP_Feature
,
preparsed_data
);
ok
(
value
==
13
,
"HidP_MaxDataListLength(HidP_Feature) returned %d, expected %d
\n
"
,
value
,
13
);
value
=
1
;
status
=
HidP_GetData
(
HidP_Input
,
data
,
&
value
,
preparsed_data
,
report
,
caps
.
InputReportByteLength
);
todo_wine_if
(
report_id
)
ok
(
status
==
HIDP_STATUS_BUFFER_TOO_SMALL
,
"HidP_GetData returned %#x
\n
"
,
status
);
todo_wine
ok
(
value
==
9
,
"got data count %d, expected %d
\n
"
,
value
,
9
);
memset
(
data
,
0
,
sizeof
(
data
));
status
=
HidP_GetData
(
HidP_Input
,
data
,
&
value
,
preparsed_data
,
report
,
caps
.
InputReportByteLength
);
todo_wine_if
(
report_id
)
ok
(
status
==
HIDP_STATUS_SUCCESS
,
"HidP_GetData returned %#x
\n
"
,
status
);
if
(
status
==
HIDP_STATUS_SUCCESS
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
expect_data
);
++
i
)
{
winetest_push_context
(
"data[%d]"
,
i
);
todo_wine_if
(
i
>=
4
)
check_member
(
data
[
i
],
expect_data
[
i
],
"%d"
,
DataIndex
);
todo_wine_if
(
i
==
6
||
i
==
7
||
i
==
8
)
check_member
(
data
[
i
],
expect_data
[
i
],
"%d"
,
RawValue
);
winetest_pop_context
();
}
memset
(
report
,
0xcd
,
sizeof
(
report
));
status
=
HidP_InitializeReportForID
(
HidP_Feature
,
3
,
preparsed_data
,
report
,
caps
.
FeatureReportByteLength
);
todo_wine_if
(
!
report_id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment