Bruno Jesus : msvfw32/tests: Add tests for ICInfo().
Alexandre Julliard
julliard at winehq.org
Mon Dec 19 13:10:38 CST 2016
Module: wine
Branch: stable
Commit: 065f67360e592ab005e04e09ec0083e73eca15a4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=065f67360e592ab005e04e09ec0083e73eca15a4
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Tue Nov 22 03:52:53 2016 -0200
msvfw32/tests: Add tests for ICInfo().
Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 90e4ad3b144b44805e21b8549129c29e75b797e2)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/msvfw32/tests/msvfw.c | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/dlls/msvfw32/tests/msvfw.c b/dlls/msvfw32/tests/msvfw.c
index 125cac5..507d003 100644
--- a/dlls/msvfw32/tests/msvfw.c
+++ b/dlls/msvfw32/tests/msvfw.c
@@ -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();
}
More information about the wine-cvs
mailing list