David Hedberg david.hedberg@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.