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
e9a5cd2e
Commit
e9a5cd2e
authored
Jun 22, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Jun 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Add UDS_SETBUDDY tests.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9ae2b046
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
updown.c
dlls/comctl32/tests/updown.c
+37
-0
No files found.
dlls/comctl32/tests/updown.c
View file @
e9a5cd2e
...
...
@@ -973,6 +973,42 @@ static void test_updown_pos_notifications(void)
DestroyWindow
(
updown
);
}
static
void
test_UDS_SETBUDDY
(
void
)
{
static
const
int
start_width
=
100
,
start_height
=
100
;
int
width
,
height
,
updown_width
;
HWND
updown
;
RECT
rect
;
BOOL
ret
;
updown
=
create_updown_control
(
UDS_ALIGNRIGHT
|
UDS_SETBUDDYINT
|
UDS_ARROWKEYS
,
g_edit
);
ret
=
SetWindowPos
(
g_edit
,
0
,
100
,
100
,
start_width
,
start_height
,
SWP_NOACTIVATE
|
SWP_NOZORDER
);
ok
(
ret
,
"SetWindowPos failed, error %u.
\n
"
,
GetLastError
());
ret
=
GetWindowRect
(
g_edit
,
&
rect
);
ok
(
ret
,
"GetWindowRect failed, error %u.
\n
"
,
GetLastError
());
width
=
rect
.
right
-
rect
.
left
;
height
=
rect
.
bottom
-
rect
.
top
;
ok
(
width
==
start_width
,
"Expected width %d, got %d.
\n
"
,
start_width
,
width
);
ok
(
height
==
start_height
,
"Expected height %d, got %d.
\n
"
,
start_height
,
height
);
SendMessageA
(
updown
,
UDM_SETBUDDY
,
(
WPARAM
)
g_edit
,
0
);
ret
=
GetWindowRect
(
g_edit
,
&
rect
);
ok
(
ret
,
"GetWindowRect failed, error %u.
\n
"
,
GetLastError
());
updown_width
=
start_width
-
(
rect
.
right
-
rect
.
left
);
ok
(
updown_width
>
0
,
"Expected updown width > 0, got %d.
\n
"
,
updown_width
);
SendMessageA
(
updown
,
UDM_SETBUDDY
,
(
WPARAM
)
g_edit
,
0
);
ret
=
GetWindowRect
(
g_edit
,
&
rect
);
ok
(
ret
,
"GetWindowRect failed, error %u.
\n
"
,
GetLastError
());
width
=
rect
.
right
-
rect
.
left
;
height
=
rect
.
bottom
-
rect
.
top
;
ok
(
width
==
start_width
-
2
*
updown_width
,
"Expected width %d, got %d.
\n
"
,
start_width
-
2
*
updown_width
,
width
);
ok
(
height
==
start_height
,
"Expected height %d, got %d.
\n
"
,
start_height
,
height
);
DestroyWindow
(
updown
);
}
static
void
init_functions
(
void
)
{
HMODULE
hComCtl32
=
LoadLibraryA
(
"comctl32.dll"
);
...
...
@@ -1002,6 +1038,7 @@ START_TEST(updown)
test_updown_buddy
();
test_updown_base
();
test_updown_unicode
();
test_UDS_SETBUDDY
();
test_UDS_SETBUDDYINT
();
test_CreateUpDownControl
();
test_updown_pos_notifications
();
...
...
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