msacm: Add parameter tests for ACM_METRIC_DRIVER_PRIORITY and
ACM_METRIC_DRIVER_SUPPORT. Fix copy&paste mislabeling on acmDriverID test failure.
This commit is contained in:
parent
1da4b59e33
commit
5964f663f3
|
@ -61,6 +61,9 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
|
||||||
MMRESULT rc;
|
MMRESULT rc;
|
||||||
ACMDRIVERDETAILS dd;
|
ACMDRIVERDETAILS dd;
|
||||||
HACMDRIVER had;
|
HACMDRIVER had;
|
||||||
|
|
||||||
|
DWORD dwDriverPriority;
|
||||||
|
DWORD dwDriverSupport;
|
||||||
|
|
||||||
if (winetest_interactive) {
|
if (winetest_interactive) {
|
||||||
trace("id: %p\n", hadid);
|
trace("id: %p\n", hadid);
|
||||||
|
@ -139,6 +142,54 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
|
||||||
trace(" Supports %lu filter formats\n", dd.cFilterTags);
|
trace(" Supports %lu filter formats\n", dd.cFilterTags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* try bad pointer */
|
||||||
|
rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_PRIORITY, 0);
|
||||||
|
ok(rc == MMSYSERR_INVALPARAM,
|
||||||
|
"acmMetrics(): rc = %08x, should be %08x\n",
|
||||||
|
rc, MMSYSERR_INVALPARAM);
|
||||||
|
|
||||||
|
/* try bad handle */
|
||||||
|
rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_PRIORITY, &dwDriverPriority);
|
||||||
|
ok(rc == MMSYSERR_INVALHANDLE,
|
||||||
|
"acmMetrics(): rc = %08x, should be %08x\n",
|
||||||
|
rc, MMSYSERR_INVALHANDLE);
|
||||||
|
|
||||||
|
/* try bad pointer and handle */
|
||||||
|
rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_PRIORITY, 0);
|
||||||
|
ok(rc == MMSYSERR_INVALHANDLE,
|
||||||
|
"acmMetrics(): rc = %08x, should be %08x\n",
|
||||||
|
rc, MMSYSERR_INVALHANDLE);
|
||||||
|
|
||||||
|
/* try valid parameters */
|
||||||
|
rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_PRIORITY, &dwDriverSupport);
|
||||||
|
ok(rc == MMSYSERR_NOERROR,
|
||||||
|
"acmMetrics(): rc = %08x, should be %08x\n",
|
||||||
|
rc, MMSYSERR_NOERROR);
|
||||||
|
|
||||||
|
/* try bad pointer */
|
||||||
|
rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_SUPPORT, 0);
|
||||||
|
ok(rc == MMSYSERR_INVALPARAM,
|
||||||
|
"acmMetrics(): rc = %08x, should be %08x\n",
|
||||||
|
rc, MMSYSERR_INVALPARAM);
|
||||||
|
|
||||||
|
/* try bad handle */
|
||||||
|
rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_SUPPORT, &dwDriverSupport);
|
||||||
|
ok(rc == MMSYSERR_INVALHANDLE,
|
||||||
|
"acmMetrics(): rc = %08x, should be %08x\n",
|
||||||
|
rc, MMSYSERR_INVALHANDLE);
|
||||||
|
|
||||||
|
/* try bad pointer and handle */
|
||||||
|
rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_SUPPORT, 0);
|
||||||
|
ok(rc == MMSYSERR_INVALHANDLE,
|
||||||
|
"acmMetrics(): rc = %08x, should be %08x\n",
|
||||||
|
rc, MMSYSERR_INVALHANDLE);
|
||||||
|
|
||||||
|
/* try valid parameters */
|
||||||
|
rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_SUPPORT, &dwDriverSupport);
|
||||||
|
ok(rc == MMSYSERR_NOERROR,
|
||||||
|
"acmMetrics(): rc = %08x, should be %08x\n",
|
||||||
|
rc, MMSYSERR_NOERROR);
|
||||||
|
|
||||||
/* try invalid pointer */
|
/* try invalid pointer */
|
||||||
rc = acmDriverOpen(0, hadid, 0);
|
rc = acmDriverOpen(0, hadid, 0);
|
||||||
ok(rc == MMSYSERR_INVALPARAM,
|
ok(rc == MMSYSERR_INVALPARAM,
|
||||||
|
@ -176,13 +227,13 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
|
||||||
/* try bad handle */
|
/* try bad handle */
|
||||||
rc = acmDriverID((HACMOBJ)1, &hid, 0);
|
rc = acmDriverID((HACMOBJ)1, &hid, 0);
|
||||||
ok(rc == MMSYSERR_INVALHANDLE,
|
ok(rc == MMSYSERR_INVALHANDLE,
|
||||||
"acmMetrics(): rc = %08x, should be %08x\n",
|
"acmDriverID(): rc = %08x, should be %08x\n",
|
||||||
rc, MMSYSERR_INVALHANDLE);
|
rc, MMSYSERR_INVALHANDLE);
|
||||||
|
|
||||||
/* try bad handle and pointer */
|
/* try bad handle and pointer */
|
||||||
rc = acmDriverID((HACMOBJ)1, 0, 0);
|
rc = acmDriverID((HACMOBJ)1, 0, 0);
|
||||||
ok(rc == MMSYSERR_INVALHANDLE,
|
ok(rc == MMSYSERR_INVALHANDLE,
|
||||||
"acmMetrics(): rc = %08x, should be %08x\n",
|
"acmDriverID(): rc = %08x, should be %08x\n",
|
||||||
rc, MMSYSERR_INVALHANDLE);
|
rc, MMSYSERR_INVALHANDLE);
|
||||||
|
|
||||||
/* try bad flag */
|
/* try bad flag */
|
||||||
|
|
Loading…
Reference in New Issue