Nikolay Sivov : comctl32/tests: Add separate test for CreateUpDownControl( ).

Alexandre Julliard julliard at winehq.org
Thu Dec 21 16:37:26 CST 2017


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Dec 21 12:14:44 2017 +0300

comctl32/tests: Add separate test for CreateUpDownControl().

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

---

 dlls/comctl32/tests/updown.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c
index d6dbde0..1c21873 100644
--- a/dlls/comctl32/tests/updown.c
+++ b/dlls/comctl32/tests/updown.c
@@ -800,6 +800,29 @@ static void test_UDS_SETBUDDYINT(void)
     DestroyWindow(updown);
 }
 
+static void test_CreateUpDownControl(void)
+{
+    HWND updown, buddy;
+    DWORD range, pos;
+    RECT rect;
+
+    GetClientRect(parent_wnd, &rect);
+    updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE,
+        0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), g_edit, 100, 10, 50);
+    ok(updown != NULL, "Failed to create control.\n");
+
+    buddy = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0, 0);
+    ok(buddy == g_edit, "Unexpected buddy window.\n");
+
+    range = SendMessageA(updown, UDM_GETRANGE, 0, 0);
+    ok(range == MAKELONG(100, 10), "Unexpected range.\n");
+
+    pos = SendMessageA(updown, UDM_GETPOS, 0, 0);
+    ok(pos == MAKELONG(50, 1), "Unexpected position.\n");
+
+    DestroyWindow(updown);
+}
+
 START_TEST(updown)
 {
     HMODULE mod = GetModuleHandleA("comctl32.dll");
@@ -821,6 +844,7 @@ START_TEST(updown)
     test_updown_base();
     test_updown_unicode();
     test_UDS_SETBUDDYINT();
+    test_CreateUpDownControl();
 
     DestroyWindow(g_edit);
     DestroyWindow(parent_wnd);




More information about the wine-cvs mailing list