msacm32/tests: Add more acmStreamPrepareHeader tests.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bruno Jesus 2015-11-27 21:10:04 +08:00 committed by Alexandre Julliard
parent 66d8e38ba4
commit 395b9c321b
1 changed files with 29 additions and 1 deletions

View File

@ -583,6 +583,33 @@ static void test_prepareheader(void)
ok(mr == MMSYSERR_NOERROR, "unprepare failed: 0x%x\n", mr);
ok(hdr.fdwStatus == 0, "header wasn't unprepared: 0x%x\n", hdr.fdwStatus);
memset(&hdr, 0, sizeof(hdr));
hdr.cbStruct = sizeof(hdr);
hdr.pbSrc = input;
hdr.cbSrcLength = 0; /* invalid source length */
hdr.pbDst = pcm;
hdr.cbDstLength = sizeof(pcm);
mr = acmStreamPrepareHeader(has, &hdr, 0);
todo_wine
ok(mr == MMSYSERR_INVALPARAM, "expected 0x0b, got 0x%x\n", mr);
hdr.cbSrcLength = src->wfx.nBlockAlign - 1; /* less than block align */
mr = acmStreamPrepareHeader(has, &hdr, 0);
todo_wine
ok(mr == ACMERR_NOTPOSSIBLE, "expected 0x200, got 0x%x\n", mr);
hdr.cbSrcLength = src->wfx.nBlockAlign;
mr = acmStreamPrepareHeader(has, &hdr, 1); /* invalid use of reserved parameter */
todo_wine
ok(mr == MMSYSERR_INVALFLAG, "expected 0x0a, got 0x%x\n", mr);
mr = acmStreamPrepareHeader(has, &hdr, 0);
ok(mr == MMSYSERR_NOERROR, "prepare failed: 0x%x\n", mr);
mr = acmStreamUnprepareHeader(has, &hdr, 0);
ok(mr == MMSYSERR_NOERROR, "unprepare failed: 0x%x\n", mr);
memset(&hdr, 0, sizeof(hdr));
hdr.cbStruct = sizeof(hdr);
hdr.pbSrc = input;
@ -638,7 +665,8 @@ todo_wine
ok(hdr.fdwStatus == ACMSTREAMHEADER_STATUSF_DONE, "header wasn't unprepared: 0x%x\n", hdr.fdwStatus);
}
else
ok(mr == MMSYSERR_INVALPARAM, "expected 11, got %d\n", mr);
todo_wine
ok(mr == MMSYSERR_INVALPARAM, "expected 0x0b, got 0x%x\n", mr);
memset(&hdr, 0, sizeof(hdr));
hdr.cbStruct = sizeof(hdr);