Zhiyi Zhang : comctl32/tests: Add tests for button state.

Alexandre Julliard julliard at winehq.org
Wed Sep 5 16:15:27 CDT 2018


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

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Wed Sep  5 22:56:57 2018 +0800

comctl32/tests: Add tests for button state.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/tests/button.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c
index b27ab84..1fd644b 100644
--- a/dlls/comctl32/tests/button.c
+++ b/dlls/comctl32/tests/button.c
@@ -1406,6 +1406,22 @@ static void test_get_set_textmargin(void)
     }
 }
 
+static void test_state(void)
+{
+    HWND hwnd;
+    DWORD type;
+    LONG state;
+
+    /* Initial button state */
+    for (type = BS_PUSHBUTTON; type <= BS_DEFCOMMANDLINK; type++)
+    {
+        hwnd = create_button(type, NULL);
+        state = SendMessageA(hwnd, BM_GETSTATE, 0, 0);
+        ok(state == BST_UNCHECKED, "Expect state 0x%08x, got 0x%08x\n", BST_UNCHECKED, state);
+        DestroyWindow(hwnd);
+    }
+}
+
 START_TEST(button)
 {
     ULONG_PTR ctx_cookie;
@@ -1426,6 +1442,7 @@ START_TEST(button)
     test_bm_get_set_image();
     test_get_set_imagelist();
     test_get_set_textmargin();
+    test_state();
 
     unload_v6_module(ctx_cookie, hCtx);
 }




More information about the wine-cvs mailing list