Module: wine Branch: master Commit: 7ebca40912697d3d41cc039a7f1b735db035b33a URL: http://source.winehq.org/git/wine.git/?a=commit;h=7ebca40912697d3d41cc039a7f...
Author: Nikolay Sivov bunglehead@gmail.com Date: Sun Sep 20 13:58:12 2009 +0400
comctl32/updown: Additional test for display base.
---
dlls/comctl32/tests/updown.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 5cb5705..6d0e679 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -472,6 +472,7 @@ static void test_updown_base(void) { HWND updown; int r; + CHAR text[10];
updown = create_updown_control(0);
@@ -508,6 +509,25 @@ static void test_updown_base(void) ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_base_seq, "test updown base", FALSE);
DestroyWindow(updown); + + /* switch base with buddy attached */ + updown = create_updown_control(UDS_SETBUDDYINT); + + r = SendMessage(updown, UDM_SETPOS32, 0, 10); + expect(50, r); + + GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + ok(lstrcmpA(text, "10") == 0, "Expected '10', got '%s'\n", text); + + r = SendMessage(updown, UDM_SETBASE, 16, 0); + expect(10, r); + + GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + /* FIXME: currently hex output isn't properly formatted, but for this + test only change from initial text matters */ + todo_wine ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text); + + DestroyWindow(updown); }
static void test_updown_unicode(void) @@ -569,6 +589,10 @@ static void test_UDS_SETBUDDYINT(void) CHAR text[10]; BOOL b;
+ /* cleanup buddy */ + text[0] = '\0'; + SetWindowTextA(edit, text); + /* creating without UDS_SETBUDDYINT */ updown = create_updown_control(0); /* try to set UDS_SETBUDDYINT after creation */