msvfw32/tests: Add tests for ICInfo().

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bruno Jesus 2016-11-22 03:52:53 -02:00 committed by Alexandre Julliard
parent 5fb1f63976
commit 90e4ad3b14
1 changed files with 38 additions and 0 deletions

View File

@ -285,9 +285,47 @@ static void test_ICSeqCompress(void)
ok(err == ICERR_BADHANDLE, "Expected -8, got %d\n", err);
}
static void test_ICInfo(void)
{
ICINFO info, info2;
DWORD i, found;
unsigned char *fcc;
for (i = found = 0; ICInfo(0, i, &info); i++)
{
trace("Codec name: %s, fccHandler: 0x%08x\n", wine_dbgstr_w(info.szName), info.fccHandler);
ok(ICInfo(info.fccType, info.fccHandler, &info2),
"ICInfo failed on fcc 0x%08x\n", info.fccHandler);
fcc = (unsigned char *)&info.fccHandler;
if (!isalpha(fcc[0])) continue;
found++;
/* Test getting info with a different case - bug 41602 */
if (fcc[0] & 0x20)
{
fcc[0] &= ~0x20;
todo_wine
ok(ICInfo(info.fccType, info.fccHandler, &info2),
"ICInfo failed on fcc 0x%08x using lowercase fccHandler\n", info.fccHandler);
}
else
{
fcc[0] |= 0x20;
todo_wine
ok(ICInfo(info.fccType, info.fccHandler, &info2),
"ICInfo failed on fcc 0x%08x using uppercase fccHandler\n", info.fccHandler);
}
}
todo_wine
ok(found != 0, "expected at least one codec\n");
}
START_TEST(msvfw)
{
test_OpenCase();
test_Locate();
test_ICSeqCompress();
test_ICInfo();
}