Kevin Puetz : oleaut32/tests: Fix expect_wstr_acpval(...,NULL).

Alexandre Julliard julliard at winehq.org
Fri Sep 18 15:52:49 CDT 2020


Module: wine
Branch: master
Commit: b43041d79af94e92c78f1897a6e4c95a4686b8f9
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b43041d79af94e92c78f1897a6e4c95a4686b8f9

Author: Kevin Puetz <PuetzKevinA at JohnDeere.com>
Date:   Thu Sep 17 18:24:17 2020 -0500

oleaut32/tests: Fix expect_wstr_acpval(...,NULL).

A NULL expected value is always a test failure, but printing
the unexpected "wrong" value is more helpful than crashing.

Signed-off-by: Kevin Puetz <PuetzKevinA at JohnDeere.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oleaut32/tests/typelib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index 3d5aeb0a26..6f68a201ba 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -53,7 +53,7 @@
     { \
         CHAR buf[260]; \
         expect_eq(!WideCharToMultiByte(CP_ACP, 0, (expr), -1, buf, 260, NULL, NULL), 0, int, "%d"); \
-        ok(strcmp(value, buf) == 0, #expr " expected \"%s\" got \"%s\"\n", value, buf); \
+        ok(value && strcmp(value, buf) == 0, #expr " expected \"%s\" got \"%s\"\n", value, buf); \
     }
 
 #define ole_expect(expr, expect) { \




More information about the wine-cvs mailing list