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
ed7804e7
Commit
ed7804e7
authored
Nov 11, 2018
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Add more Listbox tests for ownerdraw styles.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
982b9314
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
listbox.c
dlls/comctl32/tests/listbox.c
+50
-0
No files found.
dlls/comctl32/tests/listbox.c
View file @
ed7804e7
...
...
@@ -433,6 +433,35 @@ static void test_ownerdraw(void)
ok
(
rc
.
top
<
0
,
"rc.top is not negative (%d)
\n
"
,
rc
.
top
);
DestroyWindow
(
hLB
);
/* Both FIXED and VARIABLE, FIXED should override VARIABLE. */
hLB
=
CreateWindowA
(
WC_LISTBOXA
,
"TestList"
,
LBS_OWNERDRAWFIXED
|
LBS_OWNERDRAWVARIABLE
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
NULL
,
0
);
ok
(
hLB
!=
NULL
,
"last error 0x%08x
\n
"
,
GetLastError
());
ret
=
SendMessageA
(
hLB
,
LB_INSERTSTRING
,
-
1
,
0
);
ok
(
ret
==
0
,
"Unexpected return value %d.
\n
"
,
ret
);
ret
=
SendMessageA
(
hLB
,
LB_INSERTSTRING
,
-
1
,
0
);
ok
(
ret
==
1
,
"Unexpected return value %d.
\n
"
,
ret
);
ret
=
SendMessageA
(
hLB
,
LB_SETITEMHEIGHT
,
0
,
13
);
ok
(
ret
==
LB_OKAY
,
"Failed to set item height, %d.
\n
"
,
ret
);
ret
=
SendMessageA
(
hLB
,
LB_GETITEMHEIGHT
,
0
,
0
);
ok
(
ret
==
13
,
"Unexpected item height %d.
\n
"
,
ret
);
ret
=
SendMessageA
(
hLB
,
LB_SETITEMHEIGHT
,
1
,
42
);
ok
(
ret
==
LB_OKAY
,
"Failed to set item height, %d.
\n
"
,
ret
);
ret
=
SendMessageA
(
hLB
,
LB_GETITEMHEIGHT
,
0
,
0
);
todo_wine
ok
(
ret
==
42
,
"Unexpected item height %d.
\n
"
,
ret
);
ret
=
SendMessageA
(
hLB
,
LB_GETITEMHEIGHT
,
1
,
0
);
ok
(
ret
==
42
,
"Unexpected item height %d.
\n
"
,
ret
);
DestroyWindow
(
hLB
);
DestroyWindow
(
parent
);
}
...
...
@@ -1737,7 +1766,13 @@ static void test_listbox_dlgdir(void)
static
void
test_set_count
(
void
)
{
static
const
DWORD
styles
[]
=
{
LBS_OWNERDRAWFIXED
,
LBS_HASSTRINGS
,
};
HWND
parent
,
listbox
;
unsigned
int
i
;
LONG
ret
;
RECT
r
;
...
...
@@ -1767,6 +1802,21 @@ static void test_set_count( void )
ok
(
!
IsRectEmpty
(
&
r
),
"got empty rect
\n
"
);
DestroyWindow
(
listbox
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
styles
);
++
i
)
{
listbox
=
create_listbox
(
styles
[
i
]
|
WS_CHILD
|
WS_VISIBLE
,
parent
);
SetLastError
(
0xdeadbeef
);
ret
=
SendMessageA
(
listbox
,
LB_SETCOUNT
,
100
,
0
);
todo_wine_if
(
i
==
0
)
ok
(
ret
==
LB_ERR
,
"expected %d, got %d
\n
"
,
LB_ERR
,
ret
);
todo_wine_if
(
i
==
1
)
ok
(
GetLastError
()
==
0xdeadbeef
,
"Unexpected error %d.
\n
"
,
GetLastError
()
);
DestroyWindow
(
listbox
);
}
DestroyWindow
(
parent
);
}
...
...
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