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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
82 deletions
+19
-82
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
+0
-0
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
This diff is collapsed.
Click to expand it.
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