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
9083bcc5
Commit
9083bcc5
authored
Jul 23, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add a test for invalid predefined palette type.
parent
106e7fb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
palette.c
dlls/windowscodecs/palette.c
+2
-2
palette.c
dlls/windowscodecs/tests/palette.c
+10
-0
No files found.
dlls/windowscodecs/palette.c
View file @
9083bcc5
...
...
@@ -403,8 +403,8 @@ static HRESULT WINAPI PaletteImpl_InitializePredefined(IWICPalette *iface,
break
;
default:
FIXME
(
"(%p,%u,%d): stub
\n
"
,
iface
,
type
,
add_transparent
);
return
E_
NOTIMPL
;
WARN
(
"invalid palette type %u
\n
"
,
type
);
return
E_
INVALIDARG
;
}
EnterCriticalSection
(
&
This
->
lock
);
...
...
dlls/windowscodecs/tests/palette.c
View file @
9083bcc5
...
...
@@ -402,6 +402,16 @@ static void test_predefined_palette(void)
&
IID_IWICImagingFactory
,
(
void
**
)
&
factory
);
ok
(
hr
==
S_OK
,
"CoCreateInstance error %#x
\n
"
,
hr
);
hr
=
IWICImagingFactory_CreatePalette
(
factory
,
&
palette
);
ok
(
hr
==
S_OK
,
"CreatePalette error %#x
\n
"
,
hr
);
hr
=
IWICPalette_InitializePredefined
(
palette
,
WICBitmapPaletteTypeCustom
,
FALSE
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
hr
=
IWICPalette_InitializePredefined
(
palette
,
WICBitmapPaletteTypeMedianCut
,
FALSE
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
hr
=
IWICPalette_InitializePredefined
(
palette
,
0x0f
,
FALSE
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
IWICPalette_Release
(
palette
);
for
(
i
=
0
;
i
<
sizeof
(
td
)
/
sizeof
(
td
[
0
]);
i
++
)
{
hr
=
IWICImagingFactory_CreatePalette
(
factory
,
&
palette
);
...
...
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