Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0a9531f9
Commit
0a9531f9
authored
Oct 23, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Oct 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msacm32/tests: Fix tests compilation with __WINESRC__ defined.
parent
2dbd0e16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
39 deletions
+38
-39
Makefile.in
dlls/msacm32/tests/Makefile.in
+0
-1
msacm.c
dlls/msacm32/tests/msacm.c
+38
-38
No files found.
dlls/msacm32/tests/Makefile.in
View file @
0a9531f9
TESTDLL
=
msacm32.dll
IMPORTS
=
msacm32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
msacm.c
...
...
dlls/msacm32/tests/msacm.c
View file @
0a9531f9
...
...
@@ -33,7 +33,7 @@
#include "msacm.h"
static
BOOL
CALLBACK
FormatTagEnumProc
(
HACMDRIVERID
hadid
,
PACMFORMATTAGDETAILS
paftd
,
PACMFORMATTAGDETAILS
A
paftd
,
DWORD_PTR
dwInstance
,
DWORD
fdwSupport
)
{
...
...
@@ -44,7 +44,7 @@ static BOOL CALLBACK FormatTagEnumProc(HACMDRIVERID hadid,
}
static
BOOL
CALLBACK
FormatEnumProc
(
HACMDRIVERID
hadid
,
LPACMFORMATDETAILS
pafd
,
LPACMFORMATDETAILS
A
pafd
,
DWORD_PTR
dwInstance
,
DWORD
fd
)
{
...
...
@@ -59,7 +59,7 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
DWORD
fdwSupport
)
{
MMRESULT
rc
;
ACMDRIVERDETAILS
dd
;
ACMDRIVERDETAILS
A
dd
;
HACMDRIVER
had
;
DWORD
dwDriverPriority
;
...
...
@@ -79,48 +79,48 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
}
/* try an invalid pointer */
rc
=
acmDriverDetails
(
hadid
,
0
,
0
);
rc
=
acmDriverDetails
A
(
hadid
,
0
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmDriverDetails(): rc = %08x, should be %08x
\n
"
,
"acmDriverDetails
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
/* try an invalid structure size */
ZeroMemory
(
&
dd
,
sizeof
(
dd
));
rc
=
acmDriverDetails
(
hadid
,
&
dd
,
0
);
rc
=
acmDriverDetails
A
(
hadid
,
&
dd
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmDriverDetails(): rc = %08x, should be %08x
\n
"
,
"acmDriverDetails
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
/* MSDN says this should fail but it doesn't in practice */
dd
.
cbStruct
=
4
;
rc
=
acmDriverDetails
(
hadid
,
&
dd
,
0
);
rc
=
acmDriverDetails
A
(
hadid
,
&
dd
,
0
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_NOTSUPPORTED
,
"acmDriverDetails(): rc = %08x, should be %08x
\n
"
,
"acmDriverDetails
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_NOERROR
);
/* try an invalid handle */
dd
.
cbStruct
=
sizeof
(
dd
);
rc
=
acmDriverDetails
((
HACMDRIVERID
)
1
,
&
dd
,
0
);
rc
=
acmDriverDetails
A
((
HACMDRIVERID
)
1
,
&
dd
,
0
);
ok
(
rc
==
MMSYSERR_INVALHANDLE
,
"acmDriverDetails(): rc = %08x, should be %08x
\n
"
,
"acmDriverDetails
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALHANDLE
);
/* try an invalid handle and pointer */
rc
=
acmDriverDetails
((
HACMDRIVERID
)
1
,
0
,
0
);
rc
=
acmDriverDetails
A
((
HACMDRIVERID
)
1
,
0
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmDriverDetails(): rc = %08x, should be %08x
\n
"
,
"acmDriverDetails
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
/* try invalid details */
rc
=
acmDriverDetails
(
hadid
,
&
dd
,
-
1
);
rc
=
acmDriverDetails
A
(
hadid
,
&
dd
,
-
1
);
ok
(
rc
==
MMSYSERR_INVALFLAG
,
"acmDriverDetails(): rc = %08x, should be %08x
\n
"
,
"acmDriverDetails
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALFLAG
);
/* try valid parameters */
rc
=
acmDriverDetails
(
hadid
,
&
dd
,
0
);
rc
=
acmDriverDetails
A
(
hadid
,
&
dd
,
0
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
MMSYSERR_NOTSUPPORTED
,
"acmDriverDetails(): rc = %08x, should be %08x
\n
"
,
"acmDriverDetails
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_NOERROR
);
/* cbStruct should contain size of returned data (at most sizeof(dd))
...
...
@@ -128,7 +128,7 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
*/
if
(
rc
==
MMSYSERR_NOERROR
)
{
ok
(
dd
.
cbStruct
==
sizeof
(
dd
),
"acmDriverDetails(): cbStruct = %08x
\n
"
,
dd
.
cbStruct
);
"acmDriverDetails
A
(): cbStruct = %08x
\n
"
,
dd
.
cbStruct
);
}
if
(
rc
==
MMSYSERR_NOERROR
&&
winetest_interactive
)
{
...
...
@@ -274,27 +274,27 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
"acmMetrics(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_NOERROR
);
if
(
rc
==
MMSYSERR_NOERROR
)
{
ACMFORMATDETAILS
fd
;
ACMFORMATDETAILS
A
fd
;
WAVEFORMATEX
*
pwfx
;
ACMFORMATTAGDETAILS
aftd
;
ACMFORMATTAGDETAILS
A
aftd
;
/* try bad pointer */
rc
=
acmFormatEnum
(
had
,
0
,
FormatEnumProc
,
0
,
0
);
rc
=
acmFormatEnum
A
(
had
,
0
,
FormatEnumProc
,
0
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmFormatEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
/* try bad structure size */
ZeroMemory
(
&
fd
,
sizeof
(
fd
));
rc
=
acmFormatEnum
(
had
,
&
fd
,
FormatEnumProc
,
0
,
0
);
rc
=
acmFormatEnum
A
(
had
,
&
fd
,
FormatEnumProc
,
0
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmFormatEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
fd
.
cbStruct
=
sizeof
(
fd
)
-
1
;
rc
=
acmFormatEnum
(
had
,
&
fd
,
FormatEnumProc
,
0
,
0
);
rc
=
acmFormatEnum
A
(
had
,
&
fd
,
FormatEnumProc
,
0
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmFormatEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
if
(
dwSize
<
sizeof
(
WAVEFORMATEX
))
...
...
@@ -311,43 +311,43 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
fd
.
dwFormatTag
=
WAVE_FORMAT_UNKNOWN
;
/* try valid parameters */
rc
=
acmFormatEnum
(
had
,
&
fd
,
FormatEnumProc
,
0
,
0
);
rc
=
acmFormatEnum
A
(
had
,
&
fd
,
FormatEnumProc
,
0
,
0
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"acmFormatEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_NOERROR
);
/* try bad pointer */
rc
=
acmFormatTagEnum
(
had
,
0
,
FormatTagEnumProc
,
0
,
0
);
rc
=
acmFormatTagEnum
A
(
had
,
0
,
FormatTagEnumProc
,
0
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmFormatTagEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatTagEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
/* try bad structure size */
ZeroMemory
(
&
aftd
,
sizeof
(
aftd
));
rc
=
acmFormatTagEnum
(
had
,
&
aftd
,
FormatTagEnumProc
,
0
,
0
);
rc
=
acmFormatTagEnum
A
(
had
,
&
aftd
,
FormatTagEnumProc
,
0
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmFormatTagEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatTagEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
aftd
.
cbStruct
=
sizeof
(
aftd
)
-
1
;
rc
=
acmFormatTagEnum
(
had
,
&
aftd
,
FormatTagEnumProc
,
0
,
0
);
rc
=
acmFormatTagEnum
A
(
had
,
&
aftd
,
FormatTagEnumProc
,
0
,
0
);
ok
(
rc
==
MMSYSERR_INVALPARAM
,
"acmFormatTagEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatTagEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALPARAM
);
aftd
.
cbStruct
=
sizeof
(
aftd
);
aftd
.
dwFormatTag
=
WAVE_FORMAT_UNKNOWN
;
/* try bad flag */
rc
=
acmFormatTagEnum
(
had
,
&
aftd
,
FormatTagEnumProc
,
0
,
1
);
rc
=
acmFormatTagEnum
A
(
had
,
&
aftd
,
FormatTagEnumProc
,
0
,
1
);
ok
(
rc
==
MMSYSERR_INVALFLAG
,
"acmFormatTagEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatTagEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_INVALFLAG
);
/* try valid parameters */
rc
=
acmFormatTagEnum
(
had
,
&
aftd
,
FormatTagEnumProc
,
0
,
0
);
rc
=
acmFormatTagEnum
A
(
had
,
&
aftd
,
FormatTagEnumProc
,
0
,
0
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"acmFormatTagEnum(): rc = %08x, should be %08x
\n
"
,
"acmFormatTagEnum
A
(): rc = %08x, should be %08x
\n
"
,
rc
,
MMSYSERR_NOERROR
);
HeapFree
(
GetProcessHeap
(),
0
,
pwfx
);
...
...
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