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
389bbf8f
Commit
389bbf8f
authored
Dec 19, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Move old GetPointerType tests into test_GetPointerInfo.
parent
d4aaf273
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
35 deletions
+25
-35
input.c
dlls/user32/tests/input.c
+25
-35
No files found.
dlls/user32/tests/input.c
View file @
389bbf8f
...
...
@@ -4446,38 +4446,6 @@ static void test_input_message_source(void)
UnregisterClassA
(
cls
.
lpszClassName
,
GetModuleHandleA
(
0
)
);
}
static
void
test_pointer_info
(
void
)
{
BOOL
ret
;
POINTER_INPUT_TYPE
type
=
-
1
;
POINTER_INFO
info
;
UINT
id
=
0
;
SetLastError
(
0xdeadbeef
);
ret
=
pGetPointerType
(
id
,
NULL
);
ok
(
!
ret
,
"GetPointerType should have failed.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected error ERROR_INVALID_PARAMETER, got %lu.
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetPointerType
(
id
,
&
type
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected error ERROR_INVALID_PARAMETER, got %lu.
\n
"
,
GetLastError
());
ok
(
!
ret
,
"GetPointerType failed, got type %ld for %u.
\n
"
,
type
,
id
);
ok
(
type
==
-
1
,
" type %ld
\n
"
,
type
);
id
=
1
;
ret
=
pGetPointerType
(
id
,
&
type
);
ok
(
ret
,
"GetPointerType failed, got type %ld for %u.
\n
"
,
type
,
id
);
ok
(
type
==
PT_MOUSE
,
" type %ld
\n
"
,
type
);
/* GetPointerInfo always fails unless the app receives WM_POINTER messages. */
SetLastError
(
0xdeadbeef
);
ret
=
pGetPointerInfo
(
id
,
&
info
);
ok
(
!
ret
,
"succeeded.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %lu.
\n
"
,
GetLastError
());
}
static
void
test_UnregisterDeviceNotification
(
void
)
{
BOOL
ret
=
UnregisterDeviceNotification
(
NULL
);
...
...
@@ -4617,6 +4585,7 @@ static void test_GetPointerInfo( BOOL mouse_in_pointer_enabled )
{
void
*
invalid_ptr
=
(
void
*
)
0xdeadbeef
;
POINTER_INFO
pointer_info
[
4
];
POINTER_INPUT_TYPE
type
;
WNDCLASSW
cls
=
{
.
lpfnWndProc
=
DefWindowProcW
,
...
...
@@ -4630,6 +4599,27 @@ static void test_GetPointerInfo( BOOL mouse_in_pointer_enabled )
HWND
hwnd
;
BOOL
ret
;
if
(
!
pGetPointerType
)
{
todo_wine
win_skip
(
"GetPointerType not found, skipping tests
\n
"
);
return
;
}
SetLastError
(
0xdeadbeef
);
ret
=
pGetPointerType
(
1
,
NULL
);
ok
(
!
ret
,
"GetPointerType succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got error %lu
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
pGetPointerType
(
0xdead
,
&
type
);
todo_wine
ok
(
!
ret
,
"GetPointerType succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got error %lu
\n
"
,
GetLastError
()
);
ret
=
pGetPointerType
(
1
,
&
type
);
ok
(
ret
,
"GetPointerType failed, error %lu
\n
"
,
GetLastError
()
);
ok
(
type
==
PT_MOUSE
,
" type %ld
\n
"
,
type
);
if
(
!
pGetPointerInfo
)
{
todo_wine
...
...
@@ -4844,10 +4834,10 @@ START_TEST(input)
SetCursorPos
(
pos
.
x
,
pos
.
y
);
if
(
pGetPointerType
)
test_
pointer_info
(
);
if
(
pGetPointerType
)
test_
GetPointerInfo
(
FALSE
);
else
win_skip
(
"GetPointerType is not available
\n
"
);
win_skip
(
"GetPointerType is not available
\n
"
);
test_UnregisterDeviceNotification
();
...
...
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