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
89e9d6db
Commit
89e9d6db
authored
Oct 07, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Add some ImageList_BeginDrag() tests.
parent
0a191f85
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
imagelist.c
dlls/comctl32/tests/imagelist.c
+45
-0
No files found.
dlls/comctl32/tests/imagelist.c
View file @
89e9d6db
...
@@ -253,6 +253,50 @@ static void check_bits(HWND hwnd, HIMAGELIST himl, int idx, int size,
...
@@ -253,6 +253,50 @@ static void check_bits(HWND hwnd, HIMAGELIST himl, int idx, int size,
#endif
/* VISIBLE */
#endif
/* VISIBLE */
}
}
static
void
test_begindrag
(
void
)
{
HIMAGELIST
himl
=
createImageList
(
7
,
13
);
HIMAGELIST
drag
;
BOOL
ret
;
int
count
;
POINT
hotspot
;
count
=
ImageList_GetImageCount
(
himl
);
ok
(
count
>
2
,
"Tests need an ImageList with more than 2 images
\n
"
);
/* Two BeginDrag() without EndDrag() in between */
ret
=
ImageList_BeginDrag
(
himl
,
1
,
0
,
0
);
drag
=
ImageList_GetDragImage
(
NULL
,
NULL
);
ok
(
ret
&&
drag
,
"ImageList_BeginDrag() failed
\n
"
);
ret
=
ImageList_BeginDrag
(
himl
,
0
,
3
,
5
);
ok
(
!
ret
,
"ImageList_BeginDrag() returned TRUE
\n
"
);
drag
=
ImageList_GetDragImage
(
NULL
,
&
hotspot
);
ok
(
!!
drag
,
"No active ImageList drag left
\n
"
);
ok
(
hotspot
.
x
==
0
&&
hotspot
.
y
==
0
,
"New ImageList drag was created
\n
"
);
ImageList_EndDrag
();
drag
=
ImageList_GetDragImage
(
NULL
,
NULL
);
ok
(
!
drag
,
"ImageList drag was not destroyed
\n
"
);
/* Invalid image index */
ImageList_BeginDrag
(
himl
,
0
,
0
,
0
);
ret
=
ImageList_BeginDrag
(
himl
,
count
,
3
,
5
);
ok
(
!
ret
,
"ImageList_BeginDrag() returned TRUE
\n
"
);
drag
=
ImageList_GetDragImage
(
NULL
,
&
hotspot
);
ok
(
drag
&&
hotspot
.
x
==
0
&&
hotspot
.
y
==
0
,
"Active drag should not have been canceled
\n
"
);
ImageList_EndDrag
();
drag
=
ImageList_GetDragImage
(
NULL
,
NULL
);
ok
(
!
drag
,
"ImageList drag was not destroyed
\n
"
);
/* Invalid negative image indexes succeed */
ret
=
ImageList_BeginDrag
(
himl
,
-
17
,
0
,
0
);
drag
=
ImageList_GetDragImage
(
NULL
,
NULL
);
ok
(
ret
&&
drag
,
"ImageList drag was created
\n
"
);
ImageList_EndDrag
();
ret
=
ImageList_BeginDrag
(
himl
,
-
1
,
0
,
0
);
drag
=
ImageList_GetDragImage
(
NULL
,
NULL
);
ok
(
ret
&&
drag
,
"ImageList drag was created
\n
"
);
ImageList_EndDrag
();
}
static
void
test_hotspot
(
void
)
static
void
test_hotspot
(
void
)
{
{
struct
hotspot
{
struct
hotspot
{
...
@@ -2087,6 +2131,7 @@ START_TEST(imagelist)
...
@@ -2087,6 +2131,7 @@ START_TEST(imagelist)
InitCommonControls
();
InitCommonControls
();
test_create_destroy
();
test_create_destroy
();
test_begindrag
();
test_hotspot
();
test_hotspot
();
test_add_remove
();
test_add_remove
();
test_imagecount
();
test_imagecount
();
...
...
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