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
ce19b2f3
Commit
ce19b2f3
authored
Mar 01, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c601c701
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
96 deletions
+95
-96
Makefile.in
dlls/msvfw32/tests/Makefile.in
+0
-1
mciwnd.c
dlls/msvfw32/tests/mciwnd.c
+6
-6
msvfw.c
dlls/msvfw32/tests/msvfw.c
+89
-89
No files found.
dlls/msvfw32/tests/Makefile.in
View file @
ce19b2f3
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
msvfw32.dll
IMPORTS
=
msvfw32 advapi32 gdi32 user32
...
...
dlls/msvfw32/tests/mciwnd.c
View file @
ce19b2f3
...
...
@@ -119,12 +119,12 @@ static BOOL create_avi_file(char *fname)
ULONG
buffer_length
;
ret
=
GetTempPathA
(
sizeof
(
temp_path
),
temp_path
);
ok
(
ret
,
"Failed to get a temp path, err %d
\n
"
,
GetLastError
());
ok
(
ret
,
"Failed to get a temp path, err %
l
d
\n
"
,
GetLastError
());
if
(
!
ret
)
return
FALSE
;
ret
=
GetTempFileNameA
(
temp_path
,
"mci"
,
0
,
fname
);
ok
(
ret
,
"Failed to get a temp name, err %d
\n
"
,
GetLastError
());
ok
(
ret
,
"Failed to get a temp name, err %
l
d
\n
"
,
GetLastError
());
if
(
!
ret
)
return
FALSE
;
DeleteFileA
(
fname
);
...
...
@@ -132,7 +132,7 @@ static BOOL create_avi_file(char *fname)
lstrcatA
(
fname
,
".avi"
);
hFile
=
CreateFileA
(
fname
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
ok
(
hFile
!=
INVALID_HANDLE_VALUE
,
"Failed to create a file, err %d
\n
"
,
GetLastError
());
ok
(
hFile
!=
INVALID_HANDLE_VALUE
,
"Failed to create a file, err %
l
d
\n
"
,
GetLastError
());
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
buffer_length
=
padding
[
1
];
...
...
@@ -169,7 +169,7 @@ static void test_MCIWndCreate(void)
ret
=
SendMessageA
(
window
,
MCIWNDM_GETERRORA
,
sizeof
(
error
),
(
LPARAM
)
error
);
ok
(
!
ret
||
broken
(
ret
==
ERROR_INVALID_HANDLE
)
/* w2003std, w2008s64 */
,
"Unexpected error %
l
d
\n
"
,
ret
);
"Unexpected error %
I
d
\n
"
,
ret
);
DestroyWindow
(
window
);
...
...
@@ -182,7 +182,7 @@ static void test_MCIWndCreate(void)
ret
=
SendMessageA
(
window
,
MCIWNDM_GETERRORA
,
sizeof
(
error
),
(
LPARAM
)
error
);
ok
(
!
ret
||
broken
(
ret
==
ERROR_INVALID_HANDLE
)
/* w2003std, w2008s64 */
,
"Unexpected error %
l
d
\n
"
,
ret
);
"Unexpected error %
I
d
\n
"
,
ret
);
DestroyWindow
(
parent
);
...
...
@@ -190,7 +190,7 @@ static void test_MCIWndCreate(void)
ok
(
window
!=
NULL
,
"Failed to create an MCIWnd window
\n
"
);
ret
=
SendMessageA
(
window
,
MCIWNDM_GETERRORA
,
sizeof
(
error
),
(
LPARAM
)
error
);
todo_wine
ok
(
ret
==
MCIERR_FILE_NOT_FOUND
,
"Unexpected error %
l
d
\n
"
,
ret
);
todo_wine
ok
(
ret
==
MCIERR_FILE_NOT_FOUND
,
"Unexpected error %
I
d
\n
"
,
ret
);
DestroyWindow
(
window
);
...
...
dlls/msvfw32/tests/msvfw.c
View file @
ce19b2f3
...
...
@@ -119,51 +119,51 @@ static void test_Locate(void)
else
{
bo
.
biBitCount
=
bi
.
biBitCount
=
32
;
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
ok
(
err
==
ICERR_OK
,
"Query cvid->RGB32: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query cvid->RGB32: %
l
d
\n
"
,
err
);
err
=
ICDecompressQuery
(
h
,
&
bi
,
NULL
);
ok
(
err
==
ICERR_OK
,
"Query cvid 32: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query cvid 32: %
l
d
\n
"
,
err
);
bo
.
biHeight
=
-
bo
.
biHeight
;
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
ok
(
err
==
ICERR_OK
,
"Query cvid->RGB32 height<0: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query cvid->RGB32 height<0: %
l
d
\n
"
,
err
);
bo
.
biHeight
=
-
bo
.
biHeight
;
bi
.
biWidth
=
17
;
bi
.
biBitCount
=
8
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %
l
d
\n
"
,
err
);
ok
(
tmp
.
biBitCount
==
24
,
"Expected 24 bit, got %d bit
\n
"
,
tmp
.
biBitCount
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %d
\n
"
,
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %
l
d
\n
"
,
get_stride
(
17
,
24
)
*
8
,
tmp
.
biSizeImage
);
bi
.
biBitCount
=
15
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %
l
d
\n
"
,
err
);
ok
(
tmp
.
biBitCount
==
24
,
"Expected 24 bit, got %d bit
\n
"
,
tmp
.
biBitCount
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %d
\n
"
,
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %
l
d
\n
"
,
get_stride
(
17
,
24
)
*
8
,
tmp
.
biSizeImage
);
bi
.
biBitCount
=
16
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %
l
d
\n
"
,
err
);
ok
(
tmp
.
biBitCount
==
24
,
"Expected 24 bit, got %d bit
\n
"
,
tmp
.
biBitCount
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %d
\n
"
,
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %
l
d
\n
"
,
get_stride
(
17
,
24
)
*
8
,
tmp
.
biSizeImage
);
bi
.
biBitCount
=
24
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %
l
d
\n
"
,
err
);
ok
(
tmp
.
biBitCount
==
24
,
"Expected 24 bit, got %d bit
\n
"
,
tmp
.
biBitCount
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %d
\n
"
,
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %
l
d
\n
"
,
get_stride
(
17
,
24
)
*
8
,
tmp
.
biSizeImage
);
bi
.
biBitCount
=
32
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query cvid output format: %
l
d
\n
"
,
err
);
ok
(
tmp
.
biBitCount
==
24
,
"Expected 24 bit, got %d bit
\n
"
,
tmp
.
biBitCount
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %d
\n
"
,
ok
(
tmp
.
biSizeImage
==
get_stride
(
17
,
24
)
*
8
,
"Expected size %d, got %
l
d
\n
"
,
get_stride
(
17
,
24
)
*
8
,
tmp
.
biSizeImage
);
bi
.
biWidth
=
32
;
...
...
@@ -237,63 +237,63 @@ static void test_Locate(void)
ok
(
h
!=
0
,
"No MSVC codec installed!?
\n
"
);
if
(
h
!=
0
)
{
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
ok
(
err
==
ICERR_OK
,
"Query MSVC->RGB16: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query MSVC->RGB16: %
l
d
\n
"
,
err
);
err
=
ICDecompressQuery
(
h
,
&
bi
,
NULL
);
ok
(
err
==
ICERR_OK
,
"Query MSVC 16: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query MSVC 16: %
l
d
\n
"
,
err
);
bo
.
biHeight
=
-
bo
.
biHeight
;
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
todo_wine
ok
(
err
==
ICERR_OK
,
"Query MSVC->RGB16 height<0: %d
\n
"
,
err
);
todo_wine
ok
(
err
==
ICERR_OK
,
"Query MSVC->RGB16 height<0: %
l
d
\n
"
,
err
);
bo
.
biHeight
=
-
bo
.
biHeight
;
bo
.
biBitCount
=
24
;
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
ok
(
err
==
ICERR_OK
,
"Query MSVC 16->24: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query MSVC 16->24: %
l
d
\n
"
,
err
);
bo
.
biBitCount
=
16
;
bi
.
biWidth
=
553
;
bi
.
biBitCount
=
8
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_OK
,
"Query MSVC output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query MSVC output format: %
l
d
\n
"
,
err
);
ok
(
tmp
.
biBitCount
==
8
,
"Expected 8 bit, got %d bit
\n
"
,
tmp
.
biBitCount
);
ok
(
tmp
.
biWidth
==
552
,
"Expected width 552, got %d
\n
"
,
tmp
.
biWidth
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
552
,
8
)
*
8
,
"Expected size %d, got %d
\n
"
,
ok
(
tmp
.
biWidth
==
552
,
"Expected width 552, got %
l
d
\n
"
,
tmp
.
biWidth
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
552
,
8
)
*
8
,
"Expected size %d, got %
l
d
\n
"
,
get_stride
(
552
,
8
)
*
8
,
tmp
.
biSizeImage
);
bi
.
biBitCount
=
15
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_BADFORMAT
,
"Query MSVC output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_BADFORMAT
,
"Query MSVC output format: %
l
d
\n
"
,
err
);
bi
.
biBitCount
=
16
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_OK
,
"Query MSVC output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_OK
,
"Query MSVC output format: %
l
d
\n
"
,
err
);
ok
(
tmp
.
biBitCount
==
16
,
"Expected 16 bit, got %d bit
\n
"
,
tmp
.
biBitCount
);
ok
(
tmp
.
biWidth
==
552
,
"Expected width 552, got %d
\n
"
,
tmp
.
biWidth
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
552
,
16
)
*
8
,
"Expected size %d, got %d
\n
"
,
ok
(
tmp
.
biWidth
==
552
,
"Expected width 552, got %
l
d
\n
"
,
tmp
.
biWidth
);
ok
(
tmp
.
biSizeImage
==
get_stride
(
552
,
16
)
*
8
,
"Expected size %d, got %
l
d
\n
"
,
get_stride
(
552
,
16
)
*
8
,
tmp
.
biSizeImage
);
bi
.
biBitCount
=
24
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_BADFORMAT
,
"Query MSVC output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_BADFORMAT
,
"Query MSVC output format: %
l
d
\n
"
,
err
);
bi
.
biBitCount
=
32
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_BADFORMAT
,
"Query MSVC output format: %d
\n
"
,
err
);
ok
(
err
==
ICERR_BADFORMAT
,
"Query MSVC output format: %
l
d
\n
"
,
err
);
bi
.
biHeight
=
17
;
bi
.
biBitCount
=
8
;
err
=
ICDecompressGetFormat
(
h
,
&
bi
,
&
tmp
);
ok
(
err
==
ICERR_OK
,
"Query MSVC output format: %d
\n
"
,
err
);
ok
(
tmp
.
biHeight
==
16
,
"Expected height 16, got %d
\n
"
,
tmp
.
biHeight
);
ok
(
err
==
ICERR_OK
,
"Query MSVC output format: %
l
d
\n
"
,
err
);
ok
(
tmp
.
biHeight
==
16
,
"Expected height 16, got %
l
d
\n
"
,
tmp
.
biHeight
);
bi
.
biHeight
=
8
;
bi
.
biWidth
=
32
;
bi
.
biCompression
=
mmioFOURCC
(
'm'
,
's'
,
'v'
,
'c'
);
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
ok
(
err
==
ICERR_BADFORMAT
,
"Query msvc->RGB16: %d
\n
"
,
err
);
ok
(
err
==
ICERR_BADFORMAT
,
"Query msvc->RGB16: %
l
d
\n
"
,
err
);
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
}
...
...
@@ -358,20 +358,20 @@ static void test_ICSeqCompress(void)
{
frame_len
=
0
;
frame
=
ICSeqCompressFrame
(
&
pc
,
0
,
input
,
&
key_frame
,
&
frame_len
);
ok
(
frame
!=
NULL
,
"Frame[%d]: Expected non-NULL
\n
"
,
i
);
ok
(
frame
!=
NULL
,
"Frame[%
l
d]: Expected non-NULL
\n
"
,
i
);
if
(
frame_len
==
sizeof
(
output_nkf
))
ok
(
!
memcmp
(
output_nkf
,
frame
,
frame_len
),
"Frame[%d]: Contents do not match
\n
"
,
i
);
ok
(
!
memcmp
(
output_nkf
,
frame
,
frame_len
),
"Frame[%
l
d]: Contents do not match
\n
"
,
i
);
else
if
(
frame_len
==
sizeof
(
output_kf
))
ok
(
!
memcmp
(
output_kf
,
frame
,
frame_len
),
"Frame[%d]: Contents do not match
\n
"
,
i
);
ok
(
!
memcmp
(
output_kf
,
frame
,
frame_len
),
"Frame[%
l
d]: Contents do not match
\n
"
,
i
);
else
ok
(
0
,
"Unknown frame size of %d byten
\n
"
,
frame_len
);
ok
(
0
,
"Unknown frame size of %
l
d byten
\n
"
,
frame_len
);
}
ICSeqCompressFrameEnd
(
&
pc
);
ICCompressorFree
(
&
pc
);
/* ICCompressorFree already closed the HIC */
err
=
ICClose
(
h
);
ok
(
err
==
ICERR_BADHANDLE
,
"Expected -8, got %d
\n
"
,
err
);
ok
(
err
==
ICERR_BADHANDLE
,
"Expected -8, got %
l
d
\n
"
,
err
);
}
static
ICINFO
enum_info
;
...
...
@@ -381,16 +381,16 @@ static LRESULT CALLBACK enum_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
{
ICINFO
*
info
=
(
ICINFO
*
)
lparam1
;
ok
(
!
id
,
"Got unexpected id %#
l
x.
\n
"
,
id
);
ok
(
!
id
,
"Got unexpected id %#
I
x.
\n
"
,
id
);
ok
(
msg
==
ICM_GETINFO
,
"Got unexpected message %#x.
\n
"
,
msg
);
ok
(
info
==
&
enum_info
,
"Expected lparam1 %p, got %p.
\n
"
,
&
enum_info
,
info
);
ok
(
lparam2
==
sizeof
(
ICINFO
),
"Got lparam2 %
l
d.
\n
"
,
lparam2
);
ok
(
lparam2
==
sizeof
(
ICINFO
),
"Got lparam2 %
I
d.
\n
"
,
lparam2
);
ok
(
!
info
->
fccType
,
"Got unexpected type %#x.
\n
"
,
info
->
fccType
);
ok
(
!
info
->
fccHandler
,
"Got unexpected handler %#x.
\n
"
,
info
->
fccHandler
);
ok
(
!
info
->
dwFlags
,
"Got unexpected flags %#x.
\n
"
,
info
->
dwFlags
);
ok
(
!
info
->
dwVersion
,
"Got unexpected version %#x.
\n
"
,
info
->
dwVersion
);
ok
(
info
->
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#x.
\n
"
,
info
->
dwVersionICM
);
ok
(
!
info
->
fccType
,
"Got unexpected type %#
l
x.
\n
"
,
info
->
fccType
);
ok
(
!
info
->
fccHandler
,
"Got unexpected handler %#
l
x.
\n
"
,
info
->
fccHandler
);
ok
(
!
info
->
dwFlags
,
"Got unexpected flags %#
l
x.
\n
"
,
info
->
dwFlags
);
ok
(
!
info
->
dwVersion
,
"Got unexpected version %#
l
x.
\n
"
,
info
->
dwVersion
);
ok
(
info
->
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#
l
x.
\n
"
,
info
->
dwVersionICM
);
ok
(
!
info
->
szName
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
->
szName
));
ok
(
!
info
->
szDescription
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
->
szDescription
));
ok
(
!
info
->
szDriver
[
0
],
"Got unexpected driver %s.
\n
"
,
wine_dbgstr_w
(
info
->
szDriver
));
...
...
@@ -418,17 +418,17 @@ static void test_ICInfo(void)
info
.
dwSize
=
sizeof
(
info
);
if
(
!
ICInfo
(
0
,
i
++
,
&
info
))
break
;
trace
(
"Codec name: %s, fccHandler: 0x%08x
\n
"
,
wine_dbgstr_w
(
info
.
szName
),
info
.
fccHandler
);
trace
(
"Codec name: %s, fccHandler: 0x%08
l
x
\n
"
,
wine_dbgstr_w
(
info
.
szName
),
info
.
fccHandler
);
ok
(
info
.
fccType
,
"Expected nonzero type.
\n
"
);
ok
(
info
.
fccHandler
,
"Expected nonzero handler.
\n
"
);
ok
(
!
info
.
dwFlags
,
"Got unexpected flags %#x.
\n
"
,
info
.
dwFlags
);
ok
(
!
info
.
dwVersion
,
"Got unexpected version %#x.
\n
"
,
info
.
dwVersion
);
ok
(
info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#x.
\n
"
,
info
.
dwVersionICM
);
ok
(
!
info
.
dwFlags
,
"Got unexpected flags %#
l
x.
\n
"
,
info
.
dwFlags
);
ok
(
!
info
.
dwVersion
,
"Got unexpected version %#
l
x.
\n
"
,
info
.
dwVersion
);
ok
(
info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#
l
x.
\n
"
,
info
.
dwVersionICM
);
ok
(
!
info
.
szName
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
.
szName
));
ok
(
!
info
.
szDescription
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
.
szDescription
));
ok
(
ICInfo
(
info
.
fccType
,
info
.
fccHandler
,
&
info2
),
"ICInfo failed on fcc 0x%08x
\n
"
,
info
.
fccHandler
);
"ICInfo failed on fcc 0x%08
l
x
\n
"
,
info
.
fccHandler
);
fcc
=
(
unsigned
char
*
)
&
info
.
fccHandler
;
if
(
!
isalpha
(
fcc
[
0
]))
continue
;
...
...
@@ -437,18 +437,18 @@ static void test_ICInfo(void)
/* Test getting info with a different case - bug 41602 */
fcc
[
0
]
^=
0x20
;
ok
(
ICInfo
(
info
.
fccType
,
info
.
fccHandler
,
&
info2
),
"ICInfo failed on fcc 0x%08x
\n
"
,
info
.
fccHandler
);
"ICInfo failed on fcc 0x%08
l
x
\n
"
,
info
.
fccHandler
);
}
ok
(
found
!=
0
,
"expected at least one codec
\n
"
);
memset
(
&
info
,
0x55
,
sizeof
(
info
));
info
.
dwSize
=
sizeof
(
info
);
ok
(
!
ICInfo
(
ICTYPE_VIDEO
,
mmioFOURCC
(
'f'
,
'a'
,
'k'
,
'e'
),
&
info
),
"expected failure
\n
"
);
ok
(
info
.
fccType
==
ICTYPE_VIDEO
,
"got 0x%08x
\n
"
,
info
.
fccType
);
ok
(
info
.
fccHandler
==
mmioFOURCC
(
'f'
,
'a'
,
'k'
,
'e'
),
"got 0x%08x
\n
"
,
info
.
fccHandler
);
ok
(
!
info
.
dwFlags
,
"Got unexpected flags %#x.
\n
"
,
info
.
dwFlags
);
ok
(
!
info
.
dwVersion
,
"Got unexpected version %#x.
\n
"
,
info
.
dwVersion
);
ok
(
info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#x.
\n
"
,
info
.
dwVersionICM
);
ok
(
info
.
fccType
==
ICTYPE_VIDEO
,
"got 0x%08
l
x
\n
"
,
info
.
fccType
);
ok
(
info
.
fccHandler
==
mmioFOURCC
(
'f'
,
'a'
,
'k'
,
'e'
),
"got 0x%08
l
x
\n
"
,
info
.
fccHandler
);
ok
(
!
info
.
dwFlags
,
"Got unexpected flags %#
l
x.
\n
"
,
info
.
dwFlags
);
ok
(
!
info
.
dwVersion
,
"Got unexpected version %#
l
x.
\n
"
,
info
.
dwVersion
);
ok
(
info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#
l
x.
\n
"
,
info
.
dwVersionICM
);
ok
(
!
info
.
szName
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
.
szName
));
ok
(
!
info
.
szDescription
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
.
szDescription
));
ok
(
!
info
.
szDriver
[
0
],
"Got unexpected driver %s.
\n
"
,
wine_dbgstr_w
(
info
.
szDriver
));
...
...
@@ -461,17 +461,17 @@ static void test_ICInfo(void)
size
=
sizeof
(
buffer
);
res
=
RegQueryValueExA
(
key
,
"wine.test"
,
NULL
,
NULL
,
(
BYTE
*
)
buffer
,
&
size
);
ok
(
!
res
,
"Failed to query value, error %d.
\n
"
,
res
);
ok
(
!
res
,
"Failed to query value, error %
l
d.
\n
"
,
res
);
ok
(
!
strcmp
(
buffer
,
"bogus"
),
"Got unexpected value
\"
%s
\"
.
\n
"
,
buffer
);
memset
(
&
info
,
0x55
,
sizeof
(
info
));
info
.
dwSize
=
sizeof
(
info
);
ok
(
ICInfo
(
test_type
,
test_handler
,
&
info
),
"Expected success.
\n
"
);
ok
(
info
.
fccType
==
test_type
,
"Got unexpected type %#x.
\n
"
,
info
.
fccType
);
ok
(
info
.
fccHandler
==
test_handler
,
"Got unexpected handler %#x.
\n
"
,
info
.
fccHandler
);
ok
(
!
info
.
dwFlags
,
"Got unexpected flags %#x.
\n
"
,
info
.
dwFlags
);
ok
(
!
info
.
dwVersion
,
"Got unexpected version %#x.
\n
"
,
info
.
dwVersion
);
ok
(
info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#x.
\n
"
,
info
.
dwVersionICM
);
ok
(
info
.
fccType
==
test_type
,
"Got unexpected type %#
l
x.
\n
"
,
info
.
fccType
);
ok
(
info
.
fccHandler
==
test_handler
,
"Got unexpected handler %#
l
x.
\n
"
,
info
.
fccHandler
);
ok
(
!
info
.
dwFlags
,
"Got unexpected flags %#
l
x.
\n
"
,
info
.
dwFlags
);
ok
(
!
info
.
dwVersion
,
"Got unexpected version %#
l
x.
\n
"
,
info
.
dwVersion
);
ok
(
info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#
l
x.
\n
"
,
info
.
dwVersionICM
);
ok
(
!
info
.
szName
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
.
szName
));
ok
(
!
info
.
szDescription
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
.
szDescription
));
ok
(
!
lstrcmpW
(
info
.
szDriver
,
L"bogus"
),
"Got unexpected driver %s.
\n
"
,
wine_dbgstr_w
(
info
.
szDriver
));
...
...
@@ -484,7 +484,7 @@ static void test_ICInfo(void)
ok
(
ret
,
"Failed to remove driver.
\n
"
);
res
=
RegDeleteValueA
(
key
,
"wine.test"
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Got error %u.
\n
"
,
res
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Got error %
l
u.
\n
"
,
res
);
RegCloseKey
(
key
);
}
else
...
...
@@ -495,11 +495,11 @@ static void test_ICInfo(void)
memset
(
&
info
,
0x55
,
sizeof
(
info
));
info
.
dwSize
=
sizeof
(
info
);
ok
(
ICInfo
(
test_type
,
test_handler
,
&
info
),
"Expected success.
\n
"
);
ok
(
info
.
fccType
==
test_type
,
"Got unexpected type %#x.
\n
"
,
info
.
fccType
);
ok
(
info
.
fccHandler
==
test_handler
,
"Got unexpected handler %#x.
\n
"
,
info
.
fccHandler
);
ok
(
!
info
.
dwFlags
,
"Got unexpected flags %#x.
\n
"
,
info
.
dwFlags
);
ok
(
!
info
.
dwVersion
,
"Got unexpected version %#x.
\n
"
,
info
.
dwVersion
);
ok
(
info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#x.
\n
"
,
info
.
dwVersionICM
);
ok
(
info
.
fccType
==
test_type
,
"Got unexpected type %#
l
x.
\n
"
,
info
.
fccType
);
ok
(
info
.
fccHandler
==
test_handler
,
"Got unexpected handler %#
l
x.
\n
"
,
info
.
fccHandler
);
ok
(
!
info
.
dwFlags
,
"Got unexpected flags %#
l
x.
\n
"
,
info
.
dwFlags
);
ok
(
!
info
.
dwVersion
,
"Got unexpected version %#
l
x.
\n
"
,
info
.
dwVersion
);
ok
(
info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#
l
x.
\n
"
,
info
.
dwVersionICM
);
ok
(
!
info
.
szName
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
.
szName
));
ok
(
!
info
.
szDescription
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
info
.
szDescription
));
ok
(
!
lstrcmpW
(
info
.
szDriver
,
L"bogus"
),
"Got unexpected driver %s.
\n
"
,
wine_dbgstr_w
(
info
.
szDriver
));
...
...
@@ -518,11 +518,11 @@ static void test_ICInfo(void)
memset
(
&
enum_info
,
0x55
,
sizeof
(
enum_info
));
enum_info
.
dwSize
=
sizeof
(
enum_info
);
ok
(
ICInfo
(
test_type
,
test_handler
,
&
enum_info
),
"Expected success.
\n
"
);
ok
(
!
enum_info
.
fccType
,
"Got unexpected type %#x.
\n
"
,
enum_info
.
fccType
);
ok
(
!
enum_info
.
fccHandler
,
"Got unexpected handler %#x.
\n
"
,
enum_info
.
fccHandler
);
ok
(
!
enum_info
.
dwFlags
,
"Got unexpected flags %#x.
\n
"
,
enum_info
.
dwFlags
);
ok
(
enum_info
.
dwVersion
==
0xdeadbeef
,
"Got unexpected version %#x.
\n
"
,
enum_info
.
dwVersion
);
ok
(
enum_info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#x.
\n
"
,
enum_info
.
dwVersionICM
);
ok
(
!
enum_info
.
fccType
,
"Got unexpected type %#
l
x.
\n
"
,
enum_info
.
fccType
);
ok
(
!
enum_info
.
fccHandler
,
"Got unexpected handler %#
l
x.
\n
"
,
enum_info
.
fccHandler
);
ok
(
!
enum_info
.
dwFlags
,
"Got unexpected flags %#
l
x.
\n
"
,
enum_info
.
dwFlags
);
ok
(
enum_info
.
dwVersion
==
0xdeadbeef
,
"Got unexpected version %#
l
x.
\n
"
,
enum_info
.
dwVersion
);
ok
(
enum_info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#
l
x.
\n
"
,
enum_info
.
dwVersionICM
);
ok
(
!
enum_info
.
szName
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
enum_info
.
szName
));
ok
(
!
enum_info
.
szDescription
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
enum_info
.
szDescription
));
ok
(
!
enum_info
.
szDriver
[
0
],
"Got unexpected driver %s.
\n
"
,
wine_dbgstr_w
(
enum_info
.
szDriver
));
...
...
@@ -531,11 +531,11 @@ static void test_ICInfo(void)
memset
(
&
enum_info
,
0x55
,
sizeof
(
enum_info
));
enum_info
.
dwSize
=
sizeof
(
enum_info
);
ok
(
ICInfo
(
test_type
,
0
,
&
enum_info
),
"Expected success.
\n
"
);
ok
(
!
enum_info
.
fccType
,
"Got unexpected type %#x.
\n
"
,
enum_info
.
fccType
);
ok
(
!
enum_info
.
fccHandler
,
"Got unexpected handler %#x.
\n
"
,
enum_info
.
fccHandler
);
ok
(
!
enum_info
.
dwFlags
,
"Got unexpected flags %#x.
\n
"
,
enum_info
.
dwFlags
);
ok
(
enum_info
.
dwVersion
==
0xdeadbeef
,
"Got unexpected version %#x.
\n
"
,
enum_info
.
dwVersion
);
ok
(
enum_info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#x.
\n
"
,
enum_info
.
dwVersionICM
);
ok
(
!
enum_info
.
fccType
,
"Got unexpected type %#
l
x.
\n
"
,
enum_info
.
fccType
);
ok
(
!
enum_info
.
fccHandler
,
"Got unexpected handler %#
l
x.
\n
"
,
enum_info
.
fccHandler
);
ok
(
!
enum_info
.
dwFlags
,
"Got unexpected flags %#
l
x.
\n
"
,
enum_info
.
dwFlags
);
ok
(
enum_info
.
dwVersion
==
0xdeadbeef
,
"Got unexpected version %#
l
x.
\n
"
,
enum_info
.
dwVersion
);
ok
(
enum_info
.
dwVersionICM
==
ICVERSION
,
"Got unexpected ICM version %#
l
x.
\n
"
,
enum_info
.
dwVersionICM
);
ok
(
!
enum_info
.
szName
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
enum_info
.
szName
));
ok
(
!
enum_info
.
szDescription
[
0
],
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
enum_info
.
szDescription
));
ok
(
!
enum_info
.
szDriver
[
0
],
"Got unexpected driver %s.
\n
"
,
wine_dbgstr_w
(
enum_info
.
szDriver
));
...
...
@@ -565,7 +565,7 @@ static LRESULT CALLBACK gdf_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
LRESULT
ret
=
0
;
if
(
winetest_debug
>
1
)
trace
(
"(%#
lx, %p, %#x, %#lx, %#l
x)
\n
"
,
id
,
driver
,
msg
,
lparam1
,
lparam2
);
trace
(
"(%#
Ix, %p, %#x, %#Ix, %#I
x)
\n
"
,
id
,
driver
,
msg
,
lparam1
,
lparam2
);
switch
(
msg
)
{
...
...
@@ -579,23 +579,23 @@ static LRESULT CALLBACK gdf_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
BITMAPINFOHEADER
*
out
=
(
BITMAPINFOHEADER
*
)
lparam2
;
DWORD
expected_size
;
ok
(
lparam1
==
(
LPARAM
)
&
gdf_in
,
"got input %#
l
x
\n
"
,
lparam1
);
ok
(
lparam1
==
(
LPARAM
)
&
gdf_in
,
"got input %#
I
x
\n
"
,
lparam1
);
if
(
!
out
)
return
ICERR_OK
;
ok
(
out
==
gdf_out
,
"got output %p
\n
"
,
out
);
ok
(
out
->
biSize
==
sizeof
(
*
out
),
"got size %d
\n
"
,
out
->
biSize
);
ok
(
out
->
biSize
==
sizeof
(
*
out
),
"got size %
l
d
\n
"
,
out
->
biSize
);
expected_size
=
get_size_image
(
out
->
biWidth
,
out
->
biHeight
,
out
->
biBitCount
);
ok
(
out
->
biSizeImage
==
expected_size
,
"expected image size %
d, got %
d
\n
"
,
ok
(
out
->
biSizeImage
==
expected_size
,
"expected image size %
ld, got %l
d
\n
"
,
expected_size
,
out
->
biSizeImage
);
ok
(
out
->
biPlanes
==
0xcccc
,
"got planes %d
\n
"
,
out
->
biPlanes
);
ok
(
out
->
biXPelsPerMeter
==
0xcccccccc
&&
out
->
biYPelsPerMeter
==
0xcccccccc
,
"got resolution %
dx%
d
\n
"
,
out
->
biXPelsPerMeter
,
out
->
biYPelsPerMeter
);
ok
(
out
->
biClrUsed
==
0xcccccccc
,
"got biClrUsed %u
\n
"
,
out
->
biClrUsed
);
ok
(
out
->
biClrImportant
==
0xcccccccc
,
"got biClrImportant %u
\n
"
,
out
->
biClrImportant
);
"got resolution %
ldx%l
d
\n
"
,
out
->
biXPelsPerMeter
,
out
->
biYPelsPerMeter
);
ok
(
out
->
biClrUsed
==
0xcccccccc
,
"got biClrUsed %
l
u
\n
"
,
out
->
biClrUsed
);
ok
(
out
->
biClrImportant
==
0xcccccccc
,
"got biClrImportant %
l
u
\n
"
,
out
->
biClrImportant
);
switch
(
get_display_format_test
)
{
...
...
@@ -631,7 +631,7 @@ static LRESULT CALLBACK gdf_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
{
BITMAPINFOHEADER
*
out
=
(
BITMAPINFOHEADER
*
)
lparam2
;
ok
(
lparam1
==
(
LPARAM
)
&
gdf_in
,
"got input %#
l
x
\n
"
,
lparam1
);
ok
(
lparam1
==
(
LPARAM
)
&
gdf_in
,
"got input %#
I
x
\n
"
,
lparam1
);
if
(
out
)
{
ok
(
out
==
gdf_out
,
"got output %p
\n
"
,
out
);
...
...
@@ -650,7 +650,7 @@ static LRESULT CALLBACK gdf_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
{
BITMAPINFO
*
out
=
(
BITMAPINFO
*
)
lparam2
;
ok
(
lparam1
==
(
LPARAM
)
&
gdf_in
,
"got input %#
l
x
\n
"
,
lparam1
);
ok
(
lparam1
==
(
LPARAM
)
&
gdf_in
,
"got input %#
I
x
\n
"
,
lparam1
);
if
(
out
)
{
ok
(
out
==
(
BITMAPINFO
*
)
gdf_out
,
"got output %p
\n
"
,
out
);
...
...
@@ -668,10 +668,10 @@ static LRESULT CALLBACK gdf_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
static
void
check_bitmap_header_
(
int
line
,
BITMAPINFOHEADER
*
header
,
LONG
width
,
LONG
height
,
WORD
depth
,
DWORD
compression
)
{
ok_
(
__FILE__
,
line
)(
header
->
biWidth
==
width
,
"expected %
d, got %
d
\n
"
,
width
,
header
->
biWidth
);
ok_
(
__FILE__
,
line
)(
header
->
biHeight
==
height
,
"expected %
d, got %
d
\n
"
,
height
,
header
->
biHeight
);
ok_
(
__FILE__
,
line
)(
header
->
biWidth
==
width
,
"expected %
ld, got %l
d
\n
"
,
width
,
header
->
biWidth
);
ok_
(
__FILE__
,
line
)(
header
->
biHeight
==
height
,
"expected %
ld, got %l
d
\n
"
,
height
,
header
->
biHeight
);
ok_
(
__FILE__
,
line
)(
header
->
biBitCount
==
depth
,
"expected %d, got %d
\n
"
,
depth
,
header
->
biBitCount
);
ok_
(
__FILE__
,
line
)(
header
->
biCompression
==
compression
,
"expected %#
x, got %#
x
\n
"
,
compression
,
header
->
biCompression
);
ok_
(
__FILE__
,
line
)(
header
->
biCompression
==
compression
,
"expected %#
lx, got %#l
x
\n
"
,
compression
,
header
->
biCompression
);
}
#define check_bitmap_header(a,b,c,d,e) check_bitmap_header_(__LINE__,a,b,c,d,e)
...
...
@@ -773,19 +773,19 @@ static void test_ICGetDisplayFormat(void)
ok
(
hic
!=
NULL
,
"ICGetDisplayFormat failed
\n
"
);
ok
(
gdf_out
->
biBitCount
==
32
||
gdf_out
->
biBitCount
==
24
,
"got %d
\n
"
,
gdf_out
->
biBitCount
);
ok
(
gdf_out
->
biCompression
==
BI_RGB
,
"got %#x
\n
"
,
gdf_out
->
biCompression
);
ok
(
gdf_out
->
biCompression
==
BI_RGB
,
"got %#
l
x
\n
"
,
gdf_out
->
biCompression
);
/* specifying 8 bpp yields a request for palette colours */
hic
=
ICGetDisplayFormat
(
hic
,
&
gdf_in
,
gdf_out
,
8
,
30
,
40
);
ok
(
hic
!=
NULL
,
"ICGetDisplayFormat failed
\n
"
);
check_bitmap_header
(
gdf_out
,
30
,
40
,
8
,
BI_RGB
);
ok
(
gdf_out
->
biClrUsed
==
1
,
"got biClrUsed %u
\n
"
,
gdf_out
->
biClrUsed
);
ok
(
gdf_out
->
biClrUsed
==
1
,
"got biClrUsed %
l
u
\n
"
,
gdf_out
->
biClrUsed
);
out_bmi
=
(
BITMAPINFO
*
)
gdf_out
;
ok
(
!
memcmp
(
&
out_bmi
->
bmiColors
[
0
],
&
color_yellow
,
sizeof
(
color_yellow
)),
"got wrong colour
\n
"
);
lres
=
ICClose
(
hic
);
ok
(
lres
==
ICERR_OK
,
"got %
l
d
\n
"
,
lres
);
ok
(
lres
==
ICERR_OK
,
"got %
I
d
\n
"
,
lres
);
ret
=
ICRemove
(
ICTYPE_VIDEO
,
testcc
,
0
);
ok
(
ret
,
"ICRemove failed
\n
"
);
...
...
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