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
9b63ea13
Commit
9b63ea13
authored
Feb 18, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
656edbb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
27 deletions
+26
-27
Makefile.in
dlls/win32u/tests/Makefile.in
+0
-1
win32u.c
dlls/win32u/tests/win32u.c
+26
-26
No files found.
dlls/win32u/tests/Makefile.in
View file @
9b63ea13
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
win32u.dll
IMPORTS
=
user32 win32u
...
...
dlls/win32u/tests/win32u.c
View file @
9b63ea13
...
...
@@ -33,12 +33,12 @@ static void test_NtUserEnumDisplayDevices(void)
SetLastError
(
0xdeadbeef
);
ret
=
NtUserEnumDisplayDevices
(
NULL
,
0
,
&
info
,
0
);
ok
(
!
ret
&&
GetLastError
()
==
0xdeadbeef
,
"NtUserEnumDisplayDevices returned %
x %
u
\n
"
,
ret
,
GetLastError
()
);
"NtUserEnumDisplayDevices returned %
#lx %l
u
\n
"
,
ret
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
NtUserEnumDisplayDevices
(
NULL
,
12345
,
&
info
,
0
);
ok
(
ret
==
STATUS_UNSUCCESSFUL
&&
GetLastError
()
==
0xdeadbeef
,
"NtUserEnumDisplayDevices returned %
x %
u
\n
"
,
ret
,
"NtUserEnumDisplayDevices returned %
#lx %l
u
\n
"
,
ret
,
GetLastError
()
);
info
.
cb
=
0
;
...
...
@@ -46,22 +46,22 @@ static void test_NtUserEnumDisplayDevices(void)
SetLastError
(
0xdeadbeef
);
ret
=
NtUserEnumDisplayDevices
(
NULL
,
0
,
&
info
,
0
);
ok
(
ret
==
STATUS_UNSUCCESSFUL
&&
GetLastError
()
==
0xdeadbeef
,
"NtUserEnumDisplayDevices returned %
x %
u
\n
"
,
ret
,
GetLastError
()
);
"NtUserEnumDisplayDevices returned %
#lx %l
u
\n
"
,
ret
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
NtUserEnumDisplayDevices
(
NULL
,
12345
,
&
info
,
0
);
ok
(
ret
==
STATUS_UNSUCCESSFUL
&&
GetLastError
()
==
0xdeadbeef
,
"NtUserEnumDisplayDevices returned %
x %
u
\n
"
,
ret
,
GetLastError
()
);
"NtUserEnumDisplayDevices returned %
#lx %l
u
\n
"
,
ret
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
NtUserEnumDisplayDevices
(
NULL
,
0
,
NULL
,
0
);
ok
(
ret
==
STATUS_UNSUCCESSFUL
&&
GetLastError
()
==
0xdeadbeef
,
"NtUserEnumDisplayDevices returned %
x %
u
\n
"
,
ret
,
GetLastError
()
);
"NtUserEnumDisplayDevices returned %
#lx %l
u
\n
"
,
ret
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
NtUserEnumDisplayDevices
(
NULL
,
12345
,
NULL
,
0
);
ok
(
ret
==
STATUS_UNSUCCESSFUL
&&
GetLastError
()
==
0xdeadbeef
,
"NtUserEnumDisplayDevices returned %
x %
u
\n
"
,
ret
,
GetLastError
()
);
"NtUserEnumDisplayDevices returned %
#lx %l
u
\n
"
,
ret
,
GetLastError
()
);
}
static
void
test_NtUserCloseWindowStation
(
void
)
...
...
@@ -71,7 +71,7 @@ static void test_NtUserCloseWindowStation(void)
SetLastError
(
0xdeadbeef
);
ret
=
NtUserCloseWindowStation
(
0
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"NtUserCloseWindowStation returned %x %u
\n
"
,
ret
,
GetLastError
()
);
"NtUserCloseWindowStation returned %x %
l
u
\n
"
,
ret
,
GetLastError
()
);
}
static
void
test_window_props
(
void
)
...
...
@@ -86,7 +86,7 @@ static void test_window_props(void)
atom
=
GlobalAddAtomW
(
L"test"
);
ret
=
NtUserSetProp
(
hwnd
,
UlongToPtr
(
atom
),
UlongToHandle
(
0xdeadbeef
)
);
ok
(
ret
,
"NtUserSetProp failed: %u
\n
"
,
GetLastError
()
);
ok
(
ret
,
"NtUserSetProp failed: %
l
u
\n
"
,
GetLastError
()
);
prop
=
GetPropW
(
hwnd
,
L"test"
);
ok
(
prop
==
UlongToHandle
(
0xdeadbeef
),
"prop = %p
\n
"
,
prop
);
...
...
@@ -119,41 +119,41 @@ static void test_NtUserBuildHwndList(void)
size
=
0
;
status
=
NtUserBuildHwndList
(
0
,
0
,
0
,
0
,
GetCurrentThreadId
(),
ARRAYSIZE
(
buf
),
buf
,
&
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
size
==
1
,
"size = %u
\n
"
,
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
ok
(
size
==
1
,
"size = %
l
u
\n
"
,
size
);
ok
(
buf
[
0
]
==
HWND_BOTTOM
,
"buf[0] = %p
\n
"
,
buf
[
0
]
);
hwnd
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_POPUP
,
0
,
0
,
0
,
0
,
GetDesktopWindow
(),
0
,
0
,
NULL
);
size
=
0
;
status
=
NtUserBuildHwndList
(
0
,
0
,
0
,
0
,
GetCurrentThreadId
(),
ARRAYSIZE
(
buf
),
buf
,
&
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
size
==
3
,
"size = %u
\n
"
,
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
ok
(
size
==
3
,
"size = %
l
u
\n
"
,
size
);
ok
(
buf
[
0
]
==
hwnd
,
"buf[0] = %p
\n
"
,
buf
[
0
]
);
ok
(
buf
[
2
]
==
HWND_BOTTOM
,
"buf[0] = %p
\n
"
,
buf
[
2
]
);
size
=
0
;
status
=
NtUserBuildHwndList
(
0
,
0
,
0
,
0
,
GetCurrentThreadId
(),
3
,
buf
,
&
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
size
==
3
,
"size = %u
\n
"
,
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
ok
(
size
==
3
,
"size = %
l
u
\n
"
,
size
);
size
=
0
;
status
=
NtUserBuildHwndList
(
0
,
0
,
0
,
0
,
GetCurrentThreadId
(),
2
,
buf
,
&
size
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
size
==
3
,
"size = %u
\n
"
,
size
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
ok
(
size
==
3
,
"size = %
l
u
\n
"
,
size
);
size
=
0
;
status
=
NtUserBuildHwndList
(
0
,
0
,
0
,
0
,
GetCurrentThreadId
(),
1
,
buf
,
&
size
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
size
==
3
,
"size = %u
\n
"
,
size
);
ok
(
status
==
STATUS_BUFFER_TOO_SMALL
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
ok
(
size
==
3
,
"size = %
l
u
\n
"
,
size
);
desktop_windows_cnt
=
0
;
EnumDesktopWindows
(
0
,
count_win
,
(
LPARAM
)
&
desktop_windows_cnt
);
size
=
0
;
status
=
NtUserBuildHwndList
(
0
,
0
,
0
,
1
,
0
,
ARRAYSIZE
(
buf
),
buf
,
&
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
size
==
desktop_windows_cnt
+
1
,
"size = %
u, expected %
u
\n
"
,
size
,
desktop_windows_cnt
+
1
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
ok
(
size
==
desktop_windows_cnt
+
1
,
"size = %
lu, expected %l
u
\n
"
,
size
,
desktop_windows_cnt
+
1
);
desktop_windows_cnt
=
0
;
EnumDesktopWindows
(
GetThreadDesktop
(
GetCurrentThreadId
()
),
count_win
,
(
LPARAM
)
&
desktop_windows_cnt
);
...
...
@@ -161,21 +161,21 @@ static void test_NtUserBuildHwndList(void)
size
=
0
;
status
=
NtUserBuildHwndList
(
GetThreadDesktop
(
GetCurrentThreadId
()),
0
,
0
,
1
,
0
,
ARRAYSIZE
(
buf
),
buf
,
&
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
size
==
desktop_windows_cnt
+
1
,
"size = %
u, expected %
u
\n
"
,
size
,
desktop_windows_cnt
+
1
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
ok
(
size
==
desktop_windows_cnt
+
1
,
"size = %
lu, expected %l
u
\n
"
,
size
,
desktop_windows_cnt
+
1
);
size
=
0
;
status
=
NtUserBuildHwndList
(
GetThreadDesktop
(
GetCurrentThreadId
()),
0
,
0
,
0
,
0
,
ARRAYSIZE
(
buf
),
buf
,
&
size
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
!
status
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
todo_wine
ok
(
size
>
desktop_windows_cnt
+
1
,
"size = %
u, expected %
u
\n
"
,
size
,
desktop_windows_cnt
+
1
);
ok
(
size
>
desktop_windows_cnt
+
1
,
"size = %
lu, expected %l
u
\n
"
,
size
,
desktop_windows_cnt
+
1
);
size
=
0xdeadbeef
;
status
=
NtUserBuildHwndList
(
UlongToHandle
(
0xdeadbeef
),
0
,
0
,
0
,
0
,
ARRAYSIZE
(
buf
),
buf
,
&
size
);
ok
(
status
==
STATUS_INVALID_HANDLE
,
"NtUserBuildHwndList failed: %#x
\n
"
,
status
);
ok
(
size
==
0xdeadbeef
,
"size = %u
\n
"
,
size
);
ok
(
status
==
STATUS_INVALID_HANDLE
,
"NtUserBuildHwndList failed: %#
l
x
\n
"
,
status
);
ok
(
size
==
0xdeadbeef
,
"size = %
l
u
\n
"
,
size
);
DestroyWindow
(
hwnd
);
}
...
...
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