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
9be7e1e8
Commit
9be7e1e8
authored
Jan 25, 2014
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Jan 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs/tests: Use common wine_dbgstr_guid implementation from test.h.
parent
e04c7359
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
125 deletions
+47
-125
bitmap.c
dlls/windowscodecs/tests/bitmap.c
+8
-20
gifformat.c
dlls/windowscodecs/tests/gifformat.c
+5
-17
info.c
dlls/windowscodecs/tests/info.c
+3
-18
metadata.c
dlls/windowscodecs/tests/metadata.c
+28
-43
pngformat.c
dlls/windowscodecs/tests/pngformat.c
+2
-14
tiffformat.c
dlls/windowscodecs/tests/tiffformat.c
+1
-13
No files found.
dlls/windowscodecs/tests/bitmap.c
View file @
9be7e1e8
...
...
@@ -32,18 +32,6 @@
static
IWICImagingFactory
*
factory
;
static
const
char
*
debugstr_guid
(
const
GUID
*
guid
)
{
static
char
buf
[
50
];
if
(
!
guid
)
return
"(null)"
;
sprintf
(
buf
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
buf
;
}
static
HRESULT
WINAPI
bitmapsource_QueryInterface
(
IWICBitmapSource
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
...
...
@@ -665,7 +653,7 @@ static void test_CreateBitmapFromHICON(void)
IWICBitmap_GetPixelFormat
(
bitmap
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat32bppBGRA
),
"unexpected pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"unexpected pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IWICBitmap_GetSize
(
bitmap
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"IWICBitmap_GetSize error %#x
\n
"
,
hr
);
...
...
@@ -693,7 +681,7 @@ static void test_CreateBitmapFromHICON(void)
IWICBitmap_GetPixelFormat
(
bitmap
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat32bppBGRA
),
"unexpected pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"unexpected pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IWICBitmap_GetSize
(
bitmap
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"IWICBitmap_GetSize error %#x
\n
"
,
hr
);
...
...
@@ -737,7 +725,7 @@ static void test_CreateBitmapFromHBITMAP(void)
IWICBitmap_GetPixelFormat
(
bitmap
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat8bppIndexed
),
"unexpected pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"unexpected pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICBitmap_GetSize
(
bitmap
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"IWICBitmap_GetSize error %#x
\n
"
,
hr
);
...
...
@@ -768,7 +756,7 @@ static void test_CreateBitmapFromHBITMAP(void)
IWICBitmap_GetPixelFormat
(
bitmap
,
&
format
);
todo_wine
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat4bppIndexed
),
"unexpected pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"unexpected pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICBitmap_GetSize
(
bitmap
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"IWICBitmap_GetSize error %#x
\n
"
,
hr
);
...
...
@@ -809,7 +797,7 @@ todo_wine
IWICBitmap_GetPixelFormat
(
bitmap
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat8bppIndexed
),
"unexpected pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"unexpected pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICBitmap_GetSize
(
bitmap
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"IWICBitmap_GetSize error %#x
\n
"
,
hr
);
...
...
@@ -855,7 +843,7 @@ todo_wine
hr
=
IWICBitmap_GetPixelFormat
(
bitmap
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat32bppBGRA
),
"unexpected pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"unexpected pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IWICBitmap_Release
(
bitmap
);
...
...
@@ -866,7 +854,7 @@ todo_wine
hr
=
IWICBitmap_GetPixelFormat
(
bitmap
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat32bppPBGRA
),
"unexpected pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"unexpected pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IWICBitmap_Release
(
bitmap
);
...
...
@@ -877,7 +865,7 @@ todo_wine
hr
=
IWICBitmap_GetPixelFormat
(
bitmap
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat32bppBGR
),
"unexpected pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"unexpected pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IWICBitmap_Release
(
bitmap
);
DeleteObject
(
hbmp
);
...
...
dlls/windowscodecs/tests/gifformat.c
View file @
9be7e1e8
...
...
@@ -57,18 +57,6 @@ static const char gif_local_palette[] = {
static
IWICImagingFactory
*
factory
;
static
const
char
*
debugstr_guid
(
const
GUID
*
guid
)
{
static
char
buf
[
50
];
if
(
!
guid
)
return
"(null)"
;
sprintf
(
buf
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
buf
;
}
static
IWICBitmapDecoder
*
create_decoder
(
const
void
*
image_data
,
UINT
image_size
)
{
HGLOBAL
hmem
;
...
...
@@ -92,7 +80,7 @@ static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size
hr
=
IWICBitmapDecoder_GetContainerFormat
(
decoder
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong container format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IStream_Release
(
stream
);
...
...
@@ -138,7 +126,7 @@ static void test_global_gif_palette(void)
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
frame
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat8bppIndexed
),
"wrong pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICBitmapFrameDecode_CopyPalette
(
frame
,
palette
);
ok
(
hr
==
S_OK
,
"CopyPalette error %#x
\n
"
,
hr
);
...
...
@@ -200,7 +188,7 @@ static void test_global_gif_palette_2frames(void)
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
frame
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat8bppIndexed
),
"wrong pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICBitmapFrameDecode_CopyPalette
(
frame
,
palette
);
ok
(
hr
==
S_OK
,
"CopyPalette error %#x
\n
"
,
hr
);
...
...
@@ -243,7 +231,7 @@ static void test_global_gif_palette_2frames(void)
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
frame
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat8bppIndexed
),
"wrong pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICBitmapFrameDecode_CopyPalette
(
frame
,
palette
);
ok
(
hr
==
S_OK
,
"CopyPalette error %#x
\n
"
,
hr
);
...
...
@@ -313,7 +301,7 @@ static void test_local_gif_palette(void)
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
frame
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat8bppIndexed
),
"wrong pixel format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong pixel format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICBitmapFrameDecode_CopyPalette
(
frame
,
palette
);
ok
(
hr
==
S_OK
,
"CopyPalette error %#x
\n
"
,
hr
);
...
...
dlls/windowscodecs/tests/info.c
View file @
9be7e1e8
...
...
@@ -31,21 +31,6 @@
#include "initguid.h"
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
static
const
char
*
debugstr_guid
(
GUID
*
guid
)
{
static
char
buf
[
50
];
if
(
!
guid
)
return
"(null)"
;
sprintf
(
buf
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
buf
;
}
static
HRESULT
get_component_info
(
const
GUID
*
clsid
,
IWICComponentInfo
**
result
)
{
IWICImagingFactory
*
factory
;
...
...
@@ -270,7 +255,7 @@ static void test_pixelformat_info(void)
memset
(
&
guid
,
0xaa
,
sizeof
(
guid
));
hr
=
IWICComponentInfo_GetCLSID
(
info
,
&
guid
);
ok
(
hr
==
S_OK
,
"GetCLSID failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
&
GUID_WICPixelFormat32bppBGRA
),
"unexpected CLSID %s
\n
"
,
debu
gstr_guid
(
&
guid
));
ok
(
IsEqualGUID
(
&
guid
,
&
GUID_WICPixelFormat32bppBGRA
),
"unexpected CLSID %s
\n
"
,
wine_db
gstr_guid
(
&
guid
));
hr
=
IWICComponentInfo_GetComponentType
(
info
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"GetComponentType failed, hr=%x
\n
"
,
hr
);
...
...
@@ -300,7 +285,7 @@ static void test_pixelformat_info(void)
hr
=
IWICComponentInfo_GetVendorGUID
(
info
,
&
guid
);
ok
(
hr
==
S_OK
,
"GetVendorGUID failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
&
GUID_VendorMicrosoft
)
||
broken
(
IsEqualGUID
(
&
guid
,
&
GUID_NULL
))
/* XP */
,
"unexpected GUID %s
\n
"
,
debu
gstr_guid
(
&
guid
));
broken
(
IsEqualGUID
(
&
guid
,
&
GUID_NULL
))
/* XP */
,
"unexpected GUID %s
\n
"
,
wine_db
gstr_guid
(
&
guid
));
len
=
0xdeadbeef
;
hr
=
IWICComponentInfo_GetVersion
(
info
,
0
,
NULL
,
&
len
);
...
...
@@ -359,7 +344,7 @@ static void test_pixelformat_info(void)
memset
(
&
guid
,
0xaa
,
sizeof
(
guid
));
hr
=
IWICPixelFormatInfo_GetFormatGUID
(
pixelformat_info
,
&
guid
);
ok
(
hr
==
S_OK
,
"GetFormatGUID failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
&
GUID_WICPixelFormat32bppBGRA
),
"unexpected GUID %s
\n
"
,
debu
gstr_guid
(
&
guid
));
ok
(
IsEqualGUID
(
&
guid
,
&
GUID_WICPixelFormat32bppBGRA
),
"unexpected GUID %s
\n
"
,
wine_db
gstr_guid
(
&
guid
));
IWICPixelFormatInfo_Release
(
pixelformat_info
);
}
...
...
dlls/windowscodecs/tests/metadata.c
View file @
9be7e1e8
...
...
@@ -177,21 +177,6 @@ static const char animatedgif[] = {
0x21
,
0x01
,
0x0C
,
'p'
,
'l'
,
'a'
,
'i'
,
'n'
,
't'
,
'e'
,
'x'
,
't'
,
' '
,
'#'
,
'2'
,
0x00
,
0x3B
};
static
const
char
*
debugstr_guid
(
REFIID
riid
)
{
static
char
buf
[
50
];
if
(
!
riid
)
return
"(null)"
;
sprintf
(
buf
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
riid
->
Data1
,
riid
->
Data2
,
riid
->
Data3
,
riid
->
Data4
[
0
],
riid
->
Data4
[
1
],
riid
->
Data4
[
2
],
riid
->
Data4
[
3
],
riid
->
Data4
[
4
],
riid
->
Data4
[
5
],
riid
->
Data4
[
6
],
riid
->
Data4
[
7
]);
return
buf
;
}
static
IStream
*
create_stream
(
const
char
*
data
,
int
data_size
)
{
HRESULT
hr
;
...
...
@@ -367,7 +352,7 @@ static void test_metadata_tEXt(void)
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatChunktEXt
),
"unexpected format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatChunktEXt
),
"unexpected format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"GetMetadataFormat failed, hr=%x
\n
"
,
hr
);
...
...
@@ -726,7 +711,7 @@ static void test_metadata_IFD(void)
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatIfd
),
"unexpected format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatIfd
),
"unexpected format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"GetMetadataFormat should fail
\n
"
);
...
...
@@ -870,7 +855,7 @@ todo_wine
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatChunktEXt
),
"unexpected format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatChunktEXt
),
"unexpected format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IWICMetadataReader_Release
(
reader
);
}
...
...
@@ -888,7 +873,7 @@ todo_wine
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatUnknown
),
"unexpected format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatUnknown
),
"unexpected format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IWICMetadataReader_Release
(
reader
);
}
...
...
@@ -1099,7 +1084,7 @@ static void test_metadata_gif(void)
hr
=
IWICMetadataBlockReader_GetContainerFormat
(
blockreader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong container format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataBlockReader_GetCount
(
blockreader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1112,7 +1097,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatLSD
),
/* Logical Screen Descriptor */
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1144,7 +1129,7 @@ static void test_metadata_gif(void)
hr
=
IWICMetadataBlockReader_GetContainerFormat
(
blockreader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong container format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataBlockReader_GetCount
(
blockreader
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
...
...
@@ -1160,7 +1145,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatIMD
),
/* Image Descriptor */
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1200,7 +1185,7 @@ static void test_metadata_gif(void)
hr
=
IWICMetadataBlockReader_GetContainerFormat
(
blockreader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong container format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataBlockReader_GetCount
(
blockreader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1213,7 +1198,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatLSD
),
/* Logical Screen Descriptor */
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1231,7 +1216,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatAPE
),
/* Application Extension */
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1249,7 +1234,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatGifComment
),
/* Comment Extension */
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1267,7 +1252,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatUnknown
),
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1299,7 +1284,7 @@ static void test_metadata_gif(void)
hr
=
IWICMetadataBlockReader_GetContainerFormat
(
blockreader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatGif
),
"wrong container format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong container format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataBlockReader_GetCount
(
blockreader
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
...
...
@@ -1315,7 +1300,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatIMD
),
/* Image Descriptor */
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1333,7 +1318,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatGifComment
),
/* Comment Extension */
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1352,7 +1337,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatUnknown
),
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1370,7 +1355,7 @@ static void test_metadata_gif(void)
{
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatGCE
),
/* Graphic Control Extension */
"wrong metadata format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong metadata format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetCount
(
reader
,
&
count
);
ok
(
hr
==
S_OK
,
"GetCount error %#x
\n
"
,
hr
);
...
...
@@ -1450,14 +1435,14 @@ static void test_metadata_LSD(void)
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatLSD
),
"wrong format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatLSD
),
"wrong format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetMetadataHandlerInfo
(
reader
,
&
info
);
ok
(
hr
==
S_OK
,
"GetMetadataHandlerInfo error %#x
\n
"
,
hr
);
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
id
);
ok
(
hr
==
S_OK
,
"GetCLSID error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
id
,
&
CLSID_WICLSDMetadataReader
),
"wrong CLSID %s
\n
"
,
debu
gstr_guid
(
&
id
));
ok
(
IsEqualGUID
(
&
id
,
&
CLSID_WICLSDMetadataReader
),
"wrong CLSID %s
\n
"
,
wine_db
gstr_guid
(
&
id
));
hr
=
IWICMetadataHandlerInfo_GetFriendlyName
(
info
,
64
,
name
,
&
dummy
);
ok
(
hr
==
S_OK
,
"GetFriendlyName error %#x
\n
"
,
hr
);
...
...
@@ -1528,14 +1513,14 @@ static void test_metadata_IMD(void)
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatIMD
),
"wrong format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatIMD
),
"wrong format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetMetadataHandlerInfo
(
reader
,
&
info
);
ok
(
hr
==
S_OK
,
"GetMetadataHandlerInfo error %#x
\n
"
,
hr
);
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
id
);
ok
(
hr
==
S_OK
,
"GetCLSID error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
id
,
&
CLSID_WICIMDMetadataReader
),
"wrong CLSID %s
\n
"
,
debu
gstr_guid
(
&
id
));
ok
(
IsEqualGUID
(
&
id
,
&
CLSID_WICIMDMetadataReader
),
"wrong CLSID %s
\n
"
,
wine_db
gstr_guid
(
&
id
));
hr
=
IWICMetadataHandlerInfo_GetFriendlyName
(
info
,
64
,
name
,
&
dummy
);
ok
(
hr
==
S_OK
,
"GetFriendlyName error %#x
\n
"
,
hr
);
...
...
@@ -1603,14 +1588,14 @@ static void test_metadata_GCE(void)
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatGCE
),
"wrong format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatGCE
),
"wrong format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICMetadataReader_GetMetadataHandlerInfo
(
reader
,
&
info
);
ok
(
hr
==
S_OK
,
"GetMetadataHandlerInfo error %#x
\n
"
,
hr
);
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
id
);
ok
(
hr
==
S_OK
,
"GetCLSID error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
id
,
&
CLSID_WICGCEMetadataReader
),
"wrong CLSID %s
\n
"
,
debu
gstr_guid
(
&
id
));
ok
(
IsEqualGUID
(
&
id
,
&
CLSID_WICGCEMetadataReader
),
"wrong CLSID %s
\n
"
,
wine_db
gstr_guid
(
&
id
));
hr
=
IWICMetadataHandlerInfo_GetFriendlyName
(
info
,
64
,
name
,
&
dummy
);
ok
(
hr
==
S_OK
,
"GetFriendlyName error %#x
\n
"
,
hr
);
...
...
@@ -1676,7 +1661,7 @@ static void test_metadata_APE(void)
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatAPE
),
"wrong format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatAPE
),
"wrong format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
PropVariantInit
(
&
value
);
id
.
vt
=
VT_LPWSTR
;
...
...
@@ -1695,7 +1680,7 @@ static void test_metadata_APE(void)
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
clsid
);
ok
(
hr
==
S_OK
,
"GetCLSID error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
clsid
,
&
CLSID_WICAPEMetadataReader
),
"wrong CLSID %s
\n
"
,
debu
gstr_guid
(
&
clsid
));
ok
(
IsEqualGUID
(
&
clsid
,
&
CLSID_WICAPEMetadataReader
),
"wrong CLSID %s
\n
"
,
wine_db
gstr_guid
(
&
clsid
));
hr
=
IWICMetadataHandlerInfo_GetFriendlyName
(
info
,
64
,
name
,
&
dummy
);
ok
(
hr
==
S_OK
,
"GetFriendlyName error %#x
\n
"
,
hr
);
...
...
@@ -1760,7 +1745,7 @@ static void test_metadata_GIF_comment(void)
hr
=
IWICMetadataReader_GetMetadataFormat
(
reader
,
&
format
);
ok
(
hr
==
S_OK
,
"GetMetadataFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatGifComment
),
"wrong format %s
\n
"
,
debu
gstr_guid
(
&
format
));
ok
(
IsEqualGUID
(
&
format
,
&
GUID_MetadataFormatGifComment
),
"wrong format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
PropVariantInit
(
&
value
);
id
.
vt
=
VT_LPWSTR
;
...
...
@@ -1777,7 +1762,7 @@ static void test_metadata_GIF_comment(void)
hr
=
IWICMetadataHandlerInfo_GetCLSID
(
info
,
&
clsid
);
ok
(
hr
==
S_OK
,
"GetCLSID error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
clsid
,
&
CLSID_WICGifCommentMetadataReader
),
"wrong CLSID %s
\n
"
,
debu
gstr_guid
(
&
clsid
));
ok
(
IsEqualGUID
(
&
clsid
,
&
CLSID_WICGifCommentMetadataReader
),
"wrong CLSID %s
\n
"
,
wine_db
gstr_guid
(
&
clsid
));
hr
=
IWICMetadataHandlerInfo_GetFriendlyName
(
info
,
64
,
name
,
&
dummy
);
ok
(
hr
==
S_OK
,
"GetFriendlyName error %#x
\n
"
,
hr
);
...
...
dlls/windowscodecs/tests/pngformat.c
View file @
9be7e1e8
...
...
@@ -275,18 +275,6 @@ static const char png_color_profile[] = {
static
IWICImagingFactory
*
factory
;
static
const
char
*
debugstr_guid
(
const
GUID
*
guid
)
{
static
char
buf
[
50
];
if
(
!
guid
)
return
"(null)"
;
sprintf
(
buf
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
buf
;
}
static
IWICBitmapDecoder
*
create_decoder
(
const
void
*
image_data
,
UINT
image_size
)
{
HGLOBAL
hmem
;
...
...
@@ -310,7 +298,7 @@ static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size
hr
=
IWICBitmapDecoder_GetContainerFormat
(
decoder
,
&
format
);
ok
(
hr
==
S_OK
,
"GetContainerFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_ContainerFormatPng
),
"wrong container format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"wrong container format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
IStream_Release
(
stream
);
...
...
@@ -563,7 +551,7 @@ static void test_png_palette(void)
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
frame
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormat1bppIndexed
),
"got wrong format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"got wrong format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICImagingFactory_CreatePalette
(
factory
,
&
palette
);
ok
(
hr
==
S_OK
,
"CreatePalette error %#x
\n
"
,
hr
);
...
...
dlls/windowscodecs/tests/tiffformat.c
View file @
9be7e1e8
...
...
@@ -96,18 +96,6 @@ static const struct tiff_1bpp_data
static
IWICImagingFactory
*
factory
;
static
const
char
*
debugstr_guid
(
const
GUID
*
guid
)
{
static
char
buf
[
50
];
if
(
!
guid
)
return
"(null)"
;
sprintf
(
buf
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
buf
;
}
static
IStream
*
create_stream
(
const
void
*
data
,
int
data_size
)
{
HRESULT
hr
;
...
...
@@ -167,7 +155,7 @@ static void test_tiff_palette(void)
hr
=
IWICBitmapFrameDecode_GetPixelFormat
(
frame
,
&
format
);
ok
(
hr
==
S_OK
,
"GetPixelFormat error %#x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
format
,
&
GUID_WICPixelFormatBlackWhite
),
"got wrong format %s
\n
"
,
debu
gstr_guid
(
&
format
));
"got wrong format %s
\n
"
,
wine_db
gstr_guid
(
&
format
));
hr
=
IWICImagingFactory_CreatePalette
(
factory
,
&
palette
);
ok
(
hr
==
S_OK
,
"CreatePalette error %#x
\n
"
,
hr
);
...
...
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