Skip to content
Snippets Groups Projects
Commit c3f9a4c3 authored by Austin Lund's avatar Austin Lund Committed by Alexandre Julliard
Browse files

comctl32/tests: Do not perform comparison of dates if GetDateFormat fails.

parent ffb68056
No related branches found
No related tags found
No related merge requests found
......@@ -673,10 +673,15 @@ static void test_wm_set_get_text(void)
buff[0] = 0;
ret = SendMessage(hWnd, WM_GETTEXT, sizeof(buff), (LPARAM)buff);
ok(strcmp(buff, a_str) != 0, "Expected text not to change, got %s\n", buff);
GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time));
ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff);
ok(strcmp(buff, a_str) != 0, "Expected text to change, got %s\n", buff);
ok(ret != 0, "Expected non-zero return value\n");
SetLastError(0xdeadbeef);
ret = GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time));
if (ret == 0)
skip("GetDateFormat failed, returned %ld, error %d\n", ret, GetLastError());
else
ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff);
DestroyWindow(hWnd);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment