Jacek Caban : msrle32/tests: Added tests.

Alexandre Julliard julliard at winehq.org
Mon Dec 30 13:06:00 CST 2013


Module: wine
Branch: master
Commit: 754e621613c3a9ff30916e59137656b226e95e30
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=754e621613c3a9ff30916e59137656b226e95e30

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Dec 30 11:53:18 2013 +0100

msrle32/tests: Added tests.

---

 configure                      |    1 +
 configure.ac                   |    1 +
 dlls/msrle32/tests/Makefile.in |    5 ++++
 dlls/msrle32/tests/msrle.c     |   48 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 10dea9a..a3c36ce 100755
--- a/configure
+++ b/configure
@@ -16976,6 +16976,7 @@ wine_fn_config_dll msls31 enable_msls31
 wine_fn_config_dll msnet32 enable_msnet32
 wine_fn_config_dll mspatcha enable_mspatcha
 wine_fn_config_dll msrle32 enable_msrle32 po
+wine_fn_config_test dlls/msrle32/tests msrle32_test
 wine_fn_config_dll mssign32 enable_mssign32
 wine_fn_config_dll mssip32 enable_mssip32
 wine_fn_config_dll mstask enable_mstask clean
diff --git a/configure.ac b/configure.ac
index afec9bb..964c068 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3019,6 +3019,7 @@ WINE_CONFIG_DLL(msls31)
 WINE_CONFIG_DLL(msnet32)
 WINE_CONFIG_DLL(mspatcha)
 WINE_CONFIG_DLL(msrle32,,[po])
+WINE_CONFIG_TEST(dlls/msrle32/tests)
 WINE_CONFIG_DLL(mssign32)
 WINE_CONFIG_DLL(mssip32)
 WINE_CONFIG_DLL(mstask,,[clean])
diff --git a/dlls/msrle32/tests/Makefile.in b/dlls/msrle32/tests/Makefile.in
new file mode 100644
index 0000000..fafc2da
--- /dev/null
+++ b/dlls/msrle32/tests/Makefile.in
@@ -0,0 +1,5 @@
+TESTDLL   = msrle32.dll
+IMPORTS   = msvfw32
+C_SRCS    = msrle.c
+
+ at MAKE_TEST_RULES@
diff --git a/dlls/msrle32/tests/msrle.c b/dlls/msrle32/tests/msrle.c
new file mode 100644
index 0000000..04cf64f
--- /dev/null
+++ b/dlls/msrle32/tests/msrle.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2013 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <vfw.h>
+#include <aviriff.h>
+
+#include "wine/test.h"
+
+static void test_encode(void)
+{
+    ICINFO info;
+    HIC hic;
+    LRESULT res;
+
+    hic = ICOpen(FCC('V','I','D','C'), FCC('m','r','l','e'), ICMODE_COMPRESS);
+    ok(hic != NULL, "ICOpen failed\n");
+
+    res = ICGetInfo(hic, &info, sizeof(info));
+    ok(res == sizeof(info), "res = %ld\n", res);
+    ok(info.dwSize == sizeof(info), "dwSize = %d\n", info.dwSize);
+    ok(info.fccHandler == FCC('M','R','L','E'), "fccHandler = %x\n", info.fccHandler);
+    todo_wine ok(info.dwFlags == (VIDCF_QUALITY|VIDCF_CRUNCH|VIDCF_TEMPORAL), "dwFlags = %x\n", info.dwFlags);
+    ok(info.dwVersionICM == ICVERSION, "dwVersionICM = %d\n", info.dwVersionICM);
+
+    ICClose(hic);
+}
+
+START_TEST(msrle)
+{
+    test_encode();
+}




More information about the wine-cvs mailing list