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
111acb15
Commit
111acb15
authored
Mar 23, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Remove excessive error handling logic.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fa4820c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
imagelist.c
dlls/comctl32/tests/imagelist.c
+4
-17
No files found.
dlls/comctl32/tests/imagelist.c
View file @
111acb15
...
...
@@ -1517,26 +1517,22 @@ static void test_ImageList_DrawIndirect(void)
hbmMask
=
CreateBitmap
(
2
,
1
,
1
,
1
,
&
maskBits
);
ok
(
hbmMask
!=
0
,
"CreateBitmap failed
\n
"
);
if
(
!
hbmMask
)
goto
cleanup
;
hbmInverseMask
=
CreateBitmap
(
2
,
1
,
1
,
1
,
&
inverseMaskBits
);
ok
(
hbmInverseMask
!=
0
,
"CreateBitmap failed
\n
"
);
if
(
!
hbmInverseMask
)
goto
cleanup
;
himl
=
pImageList_Create
(
2
,
1
,
ILC_COLOR32
,
0
,
1
);
ok
(
himl
!=
0
,
"ImageList_Create failed
\n
"
);
if
(
!
himl
)
goto
cleanup
;
hr
=
pHIMAGELIST_QueryInterface
(
himl
,
&
IID_IImageList
,
(
void
**
)
&
imgl
);
ok
(
hr
==
S_OK
,
"Failed to get interface, hr %#x.
\n
"
,
hr
);
/* Add a no-alpha image */
hbmImage
=
create_test_bitmap
(
hdcDst
,
2
,
1
,
32
,
bits_image
);
if
(
!
hbmImage
)
goto
cleanup
;
ok
(
hbmImage
!=
NULL
,
"Failed to create test bitmap.
\n
"
)
;
iImage
=
pImageList_Add
(
himl
,
hbmImage
,
hbmMask
);
ok
(
iImage
!=
-
1
,
"ImageList_Add failed
\n
"
);
if
(
iImage
==
-
1
)
goto
cleanup
;
hr
=
IImageList_GetItemFlags
(
imgl
,
1000
,
&
flags
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -1550,11 +1546,10 @@ static void test_ImageList_DrawIndirect(void)
/* Add an alpha image */
hbmAlphaImage
=
create_test_bitmap
(
hdcDst
,
2
,
1
,
32
,
bits_alpha
);
if
(
!
hbmAlphaImage
)
goto
cleanup
;
ok
(
hbmAlphaImage
!=
NULL
,
"Failed to create test bitmap.
\n
"
)
;
iAlphaImage
=
pImageList_Add
(
himl
,
hbmAlphaImage
,
hbmMask
);
ok
(
iAlphaImage
!=
-
1
,
"ImageList_Add failed
\n
"
);
if
(
iAlphaImage
==
-
1
)
goto
cleanup
;
hr
=
IImageList_GetItemFlags
(
imgl
,
iAlphaImage
,
&
flags
);
ok
(
hr
==
S_OK
,
"Failed to get item flags, hr %#x.
\n
"
,
hr
);
...
...
@@ -1562,11 +1557,10 @@ static void test_ImageList_DrawIndirect(void)
/* Add a transparent alpha image */
hbmTransparentImage
=
create_test_bitmap
(
hdcDst
,
2
,
1
,
32
,
bits_transparent
);
if
(
!
hbmTransparentImage
)
goto
cleanup
;
ok
(
hbmTransparentImage
!=
NULL
,
"Failed to create test bitmap.
\n
"
)
;
iTransparentImage
=
pImageList_Add
(
himl
,
hbmTransparentImage
,
hbmMask
);
ok
(
iTransparentImage
!=
-
1
,
"ImageList_Add failed
\n
"
);
if
(
iTransparentImage
==
-
1
)
goto
cleanup
;
hr
=
IImageList_GetItemFlags
(
imgl
,
iTransparentImage
,
&
flags
);
ok
(
hr
==
S_OK
,
"Failed to get item flags, hr %#x.
\n
"
,
hr
);
...
...
@@ -1576,8 +1570,6 @@ static void test_ImageList_DrawIndirect(void)
bitmapInfo
.
bmiHeader
.
biBitCount
=
32
;
hbmDst
=
CreateDIBSection
(
hdcDst
,
&
bitmapInfo
,
DIB_RGB_COLORS
,
(
void
**
)
&
bits
,
NULL
,
0
);
ok
(
hbmDst
&&
bits
,
"CreateDIBSection failed to return a valid bitmap and buffer
\n
"
);
if
(
!
hbmDst
||
!
bits
)
goto
cleanup
;
hbmOld
=
SelectObject
(
hdcDst
,
hbmDst
);
check_ImageList_DrawIndirect_fStyle
(
hdcDst
,
himl
,
bits
,
iImage
,
ILD_NORMAL
,
0x00ABCDEF
,
__LINE__
);
...
...
@@ -1630,24 +1622,19 @@ static void test_ImageList_DrawIndirect(void)
bitmapInfo
.
bmiHeader
.
biHeight
=
-
4
;
hbmDst
=
CreateDIBSection
(
hdcDst
,
&
bitmapInfo
,
DIB_RGB_COLORS
,
(
void
**
)
&
bits
,
NULL
,
0
);
ok
(
hbmDst
&&
bits
,
"CreateDIBSection failed to return a valid bitmap and buffer
\n
"
);
if
(
!
hbmDst
||
!
bits
)
goto
cleanup
;
SelectObject
(
hdcDst
,
hbmDst
);
hbm4x4
=
create_test_bitmap
(
hdcDst
,
4
,
4
,
32
,
bits_4x4
);
if
(
!
hbm4x4
)
goto
cleanup
;
ok
(
hbm4x4
!=
NULL
,
"Failed to create a test bitmap.
\n
"
)
;
ret
=
pImageList_SetIconSize
(
himl
,
4
,
4
);
ok
(
ret
,
"ImageList_SetIconSize failed
\n
"
);
if
(
!
ret
)
goto
cleanup
;
ret
=
pImageList_Add
(
himl
,
hbm4x4
,
NULL
);
ok
(
ret
!=
-
1
,
"ImageList_Add failed
\n
"
);
if
(
ret
==
-
1
)
goto
cleanup
;
check_ImageList_DrawIndirect_grayscale
(
hdcDst
,
himl
,
bits
,
bits_4x4
,
0
,
4
,
4
,
__LINE__
);
cleanup:
if
(
hbmOld
)
SelectObject
(
hdcDst
,
hbmOld
);
if
(
hbmDst
)
...
...
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