[PATCH 1/2] user32: Fix return value of EDIT_EM_Scroll.
Alexandre Julliard
julliard at winehq.org
Wed Mar 3 04:51:56 CST 2010
David Hedberg <david.hedberg at gmail.com> writes:
> +static void test_edit_control_scroll(void)
> +{
> + static const char *single_line_str = "a";
> + HWND hwEdit;
> + LONG ret;
> +
> + /* Check the return value when EM_SCROLL doesn't actually scroll
> + * anything. Should not return true if 0 lines were scrolled. */
> + hwEdit = CreateWindow(
> + "EDIT",
> + single_line_str,
> + WS_VSCROLL | ES_MULTILINE,
> + 1, 1, 100, 100,
> + NULL, NULL, hinst, NULL);
> +
> + assert(hwEdit);
> +
> + ret = SendMessage(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0);
> + if(LOWORD(ret))
> + skip("Scrolled lines not 0.\n");
> + else
> + ok(!ret, "Returned %x, expected 0\n", ret);
> +
> + ret = SendMessage(hwEdit, EM_SCROLL, SB_PAGEUP, 0);
> + if(LOWORD(ret))
> + skip("Scrolled lines not 0.\n");
> + else
> + ok(!ret, "Returned %x, expected 0\n", ret);
> +
> + ret = SendMessage(hwEdit, EM_SCROLL, SB_LINEUP, 0);
> + if(LOWORD(ret))
> + skip("Scrolled lines not 0.\n");
> + else
> + ok(!ret, "Returned %x, expected 0\n", ret);
> +
> + ret = SendMessage(hwEdit, EM_SCROLL, SB_LINEDOWN, 0);
> + if(LOWORD(ret))
> + skip("Scrolled lines not 0.\n");
> + else
> + ok(!ret, "Returned %x, expected 0\n", ret);
The skips aren't right. If you expect some other values they should be
handled directly in the ok() check.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list