Zhiyi Zhang (@zhiyi) commented about dlls/user32/tests/edit.c:
{ES_MULTILINE | WS_VISIBLE, WS_EX_CLIENTEDGE, {1, 1, 10, 250}, 0},
{ES_MULTILINE | WS_VISIBLE, WS_EX_CLIENTEDGE, {1, 1, 250, 10}, 0},
{ES_MULTILINE | WS_VISIBLE, WS_EX_CLIENTEDGE, {1, 1, 10, 1000}, 0},
{ES_MULTILINE | WS_VISIBLE, WS_EX_CLIENTEDGE, {1, 1, 1000, 10}, 0},
{ES_MULTILINE | WS_VISIBLE, WS_EX_CLIENTEDGE, {1, 1, 1000, 1000}, 1}
- };
- for (int i = 0; i < ARRAY_SIZE(tests); i++)
- {
edit = create_editcontrol(tests[i].style, tests[i].style_ex);
SendMessageA(edit, EM_GETRECT, 0, (LPARAM)&expected_rect);
SetWindowTextA(edit, "Test Test Test\r\n\r\nTest Test Test Test Test Test Test Test Test Test Test Test\r\n\r\nTest Test Test");
SendMessageA(edit, EM_SETRECT, 0, (LPARAM)&tests[i].input);
SendMessageA(edit, EM_GETRECT, 0, (LPARAM)&rect);
if (EqualRect(&expected_rect, &rect))
So tests[i].expected can only be 0 or 1, which means EqualRect(&expected_rect, &rect) or (rect.right - rect.left) > (expected_rect.right - expected_rect.left). Thus I would suggest renaming "expected" to "expected_equal" and make it look like the following ``` if (tests[i].expected_equal) todo_wine ok(EqualRect(&expected_rect, &rect), ...); else todo_wine ok((rect.right - rect.left) > (expected_rect.right - expected_rect.left), ...); ```