Module: wine Branch: master Commit: 5bb169ad7b5ecd7a87ba55ebc284c938efdea9db URL: http://source.winehq.org/git/wine.git/?a=commit;h=5bb169ad7b5ecd7a87ba55ebc2...
Author: Sebastian Lackner sebastian@fds-team.de Date: Wed Feb 10 08:57:57 2016 +0100
kernel32/tests: Move logic of okChildInt macro into a function.
Signed-off-by: Sebastian Lackner sebastian@fds-team.de Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/tests/process.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 4ef6431..0beb9bf 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -582,18 +582,16 @@ static void ok_child_stringWA( int line, const char *sect, const char *key, HeapFree(GetProcessHeap(),0,resultA); }
+static void ok_child_int( int line, const char *sect, const char *key, UINT expect ) +{ + UINT result = GetPrivateProfileIntA( sect, key, !expect, resfile ); + ok_(__FILE__, line)( result == expect, "%s:%s expected %u, but got %u\n", sect, key, expect, result ); +} + #define okChildString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 1 ) #define okChildIString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 0 ) #define okChildStringWA(sect, key, expect) ok_child_stringWA(__LINE__, (sect), (key), (expect), 1 ) - -/* using !expect ensures that the test will fail if the sect/key isn't present - * in result file - */ -#define okChildInt(sect, key, expect) \ - do { \ - UINT result = GetPrivateProfileIntA((sect), (key), !(expect), resfile); \ - ok(result == expect, "%s:%s expected %u, but got %u\n", (sect), (key), (UINT)(expect), result); \ - } while (0) +#define okChildInt(sect, key, expect) ok_child_int(__LINE__, (sect), (key), (expect))
static void test_Startup(void) {