Commit 525037d7 authored by Zac Brown's avatar Zac Brown Committed by Alexandre Julliard

winhttp: Add test for WinHttpTimeToSystemTime.

parent 59397fab
...@@ -161,9 +161,33 @@ static void test_WinHttpTimeFromSystemTime(void) ...@@ -161,9 +161,33 @@ static void test_WinHttpTimeFromSystemTime(void)
"Time string returned did not match expected time string.\n"); "Time string returned did not match expected time string.\n");
} }
static void test_WinHttpTimeToSystemTime(void)
{
BOOL ret;
SYSTEMTIME time;
static const SYSTEMTIME expected_time = {2008, 7, 1, 28, 10, 5, 52, 0};
static const WCHAR time_string1[] =
{'M','o','n',',',' ','2','8',' ','J','u','l',' ','2','0','0','8',' ',
+ '1','0',':','0','5',':','5','2',' ','G','M','T','\n',0};
static const WCHAR time_string2[] =
{' ','m','o','n',' ','2','8',' ','j','u','l',' ','2','0','0','8',' ',
'1','0',' ','0','5',' ','5','2','\n',0};
ret = WinHttpTimeToSystemTime(time_string1, &time);
todo_wine ok(ret == TRUE, "WinHttpTimeToSystemTime failed: %u\n", GetLastError());
todo_wine ok(memcmp(&time, &expected_time, sizeof(SYSTEMTIME)) == 0,
"Returned SYSTEMTIME structure did not match expected SYSTEMTIME structure.\n");
ret = WinHttpTimeToSystemTime(time_string2, &time);
todo_wine ok(ret == TRUE, "WinHttpTimeToSystemTime failed: %u\n", GetLastError());
todo_wine ok(memcmp(&time, &expected_time, sizeof(SYSTEMTIME)) == 0,
"Returned SYSTEMTIME structure did not match expected SYSTEMTIME structure.\n");
}
START_TEST (winhttp) START_TEST (winhttp)
{ {
test_OpenRequest(); test_OpenRequest();
test_SendRequest(); test_SendRequest();
test_WinHttpTimeFromSystemTime(); test_WinHttpTimeFromSystemTime();
test_WinHttpTimeToSystemTime();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment