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

This commit is contained in:
Austin Lund 2010-08-18 12:27:38 +10:00 committed by Alexandre Julliard
parent ffb680569a
commit c3f9a4c362
1 changed files with 8 additions and 3 deletions

View File

@ -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);
ok(strcmp(buff, a_str) != 0, "Expected text to change, got %s\n", buff);
ok(ret != 0, "Expected non-zero return value\n");
GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time));
ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff);
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);
}