Eric Pouech : user32/tests: Wrap helper macro inside function.

Alexandre Julliard julliard at winehq.org
Thu Mar 10 16:10:14 CST 2022


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

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Thu Mar 10 08:46:41 2022 +0100

user32/tests: Wrap helper macro inside function.

this lets the compiler do the int => long conversions

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/tests/edit.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c
index 6edec12e03b..777c50be337 100644
--- a/dlls/user32/tests/edit.c
+++ b/dlls/user32/tests/edit.c
@@ -2018,8 +2018,11 @@ static void test_margins_font_change(void)
 
 }
 
-#define edit_pos_ok(exp, got, txt) \
-    ok(exp == got, "wrong " #txt " expected %d got %d\n", exp, got);
+#define edit_pos_ok(exp, got, txt) edit_pos_ok_(__LINE__, exp, got, #txt)
+static inline void edit_pos_ok_(unsigned line, DWORD exp, DWORD got, const char* txt)
+{
+    ok_(__FILE__, line)(exp == got, "wrong %s expected %ld got %ld\n", txt, exp, got);
+}
 
 #define check_pos(hwEdit, set_height, test_top, test_height, test_left) \
 do { \




More information about the wine-cvs mailing list