From 1f6e66babe9f26d38a22bac70015c0eb8c9dab7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Tue, 22 Oct 2013 00:16:11 +0200 Subject: [PATCH] comctl32/tests: Use BOOL type where appropriate. --- dlls/comctl32/tests/comboex.c | 6 +++--- dlls/comctl32/tests/header.c | 6 +++--- dlls/comctl32/tests/msg.h | 2 +- dlls/comctl32/tests/subclass.c | 6 +++--- dlls/comctl32/tests/treeview.c | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/comctl32/tests/comboex.c b/dlls/comctl32/tests/comboex.c index cc173275497..9a5bee3e560 100644 --- a/dlls/comctl32/tests/comboex.c +++ b/dlls/comctl32/tests/comboex.c @@ -473,7 +473,7 @@ static LRESULT CALLBACK ComboExTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, L return 0L; } -static int init(void) +static BOOL init(void) { HMODULE hComctl32; BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); @@ -485,7 +485,7 @@ static int init(void) if (!pInitCommonControlsEx) { win_skip("InitCommonControlsEx() is missing. Skipping the tests\n"); - return 0; + return FALSE; } iccex.dwSize = sizeof(iccex); iccex.dwICC = ICC_USEREX_CLASSES; @@ -510,7 +510,7 @@ static int init(void) assert(hComboExParentWnd != NULL); hMainHinst = GetModuleHandleA(NULL); - return 1; + return TRUE; } static void cleanup(void) diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 02fa61a5bb8..f6c64816799 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -1635,7 +1635,7 @@ static LRESULT CALLBACK HeaderTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LP return 0L; } -static int init(void) +static BOOL init(void) { HMODULE hComctl32; BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); @@ -1650,7 +1650,7 @@ static int init(void) if (!pInitCommonControlsEx) { skip("InitCommonControlsEx() is missing. Skipping the tests\n"); - return 0; + return FALSE; } iccex.dwSize = sizeof(iccex); @@ -1686,7 +1686,7 @@ static int init(void) NULL, NULL, GetModuleHandleA(NULL), 0); assert(hHeaderParentWnd != NULL); ShowWindow(hHeaderParentWnd, SW_SHOW); - return 1; + return TRUE; } /* maximum 8 items allowed */ diff --git a/dlls/comctl32/tests/msg.h b/dlls/comctl32/tests/msg.h index 1d78ffea94e..fbe8fe7204f 100644 --- a/dlls/comctl32/tests/msg.h +++ b/dlls/comctl32/tests/msg.h @@ -106,7 +106,7 @@ static inline void flush_sequences(struct msg_sequence **seq, int n) } static void ok_sequence_(struct msg_sequence **seq, int sequence_index, - const struct message *expected, const char *context, int todo, + const struct message *expected, const char *context, BOOL todo, const char *file, int line) { struct msg_sequence *msg_seq = seq[sequence_index]; diff --git a/dlls/comctl32/tests/subclass.c b/dlls/comctl32/tests/subclass.c index 8511275c8f9..e32919b87d7 100644 --- a/dlls/comctl32/tests/subclass.c +++ b/dlls/comctl32/tests/subclass.c @@ -279,7 +279,7 @@ static BOOL RegisterWindowClasses(void) return TRUE; } -static int init_function_pointers(void) +static BOOL init_function_pointers(void) { HMODULE hmod; void *ptr; @@ -299,7 +299,7 @@ static int init_function_pointers(void) if(!pSetWindowSubclass || !pRemoveWindowSubclass || !pDefSubclassProc) { win_skip("SetWindowSubclass and friends are not available\n"); - return 0; + return FALSE; } /* test named exports */ @@ -316,7 +316,7 @@ static int init_function_pointers(void) #undef TESTNAMED } - return 1; + return TRUE; } START_TEST(subclass) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index b7841409744..d523c238314 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -957,8 +957,8 @@ static void test_get_set_tooltips(void) static void test_get_set_unicodeformat(void) { - BOOL bPreviousSetting = 0; - BOOL bNewSetting = 0; + BOOL bPreviousSetting = FALSE; + BOOL bNewSetting = FALSE; HWND hTree; hTree = create_treeview_control(0); @@ -966,19 +966,19 @@ static void test_get_set_unicodeformat(void) /* Check that an invalid format returned by NF_QUERY defaults to ANSI */ bPreviousSetting = (BOOL)SendMessage( hTree, TVM_GETUNICODEFORMAT, 0, 0 ); - ok(bPreviousSetting == 0, "Format should be ANSI.\n"); + ok(bPreviousSetting == FALSE, "Format should be ANSI.\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); /* Set to Unicode */ bPreviousSetting = (BOOL)SendMessage( hTree, TVM_SETUNICODEFORMAT, 1, 0 ); bNewSetting = (BOOL)SendMessage( hTree, TVM_GETUNICODEFORMAT, 0, 0 ); - ok(bNewSetting == 1, "Unicode setting did not work.\n"); + ok(bNewSetting == TRUE, "Unicode setting did not work.\n"); /* Set to ANSI */ SendMessage( hTree, TVM_SETUNICODEFORMAT, 0, 0 ); bNewSetting = (BOOL)SendMessage( hTree, TVM_GETUNICODEFORMAT, 0, 0 ); - ok(bNewSetting == 0, "ANSI setting did not work.\n"); + ok(bNewSetting == FALSE, "ANSI setting did not work.\n"); /* Revert to original setting */ SendMessage( hTree, TVM_SETUNICODEFORMAT, bPreviousSetting, 0 );