Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ef0e3792
Commit
ef0e3792
authored
Oct 02, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Oct 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Add tests for InternetTimeFromSystemTimeW with insufficient buffer.
parent
5910626a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
http.c
dlls/wininet/tests/http.c
+21
-0
No files found.
dlls/wininet/tests/http.c
View file @
ef0e3792
...
...
@@ -789,12 +789,23 @@ static void InternetTimeFromSystemTimeA_test(void)
static
const
SYSTEMTIME
time
=
{
2005
,
1
,
5
,
7
,
12
,
6
,
35
,
0
};
char
string
[
INTERNET_RFC1123_BUFSIZE
];
static
const
char
expect
[]
=
"Fri, 07 Jan 2005 12:06:35 GMT"
;
DWORD
error
;
ret
=
pInternetTimeFromSystemTimeA
(
&
time
,
INTERNET_RFC1123_FORMAT
,
string
,
sizeof
(
string
)
);
ok
(
ret
,
"InternetTimeFromSystemTimeA failed (%u)
\n
"
,
GetLastError
()
);
ok
(
!
memcmp
(
string
,
expect
,
sizeof
(
expect
)
),
"InternetTimeFromSystemTimeA failed (%u)
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeA
(
&
time
,
INTERNET_RFC1123_FORMAT
,
string
,
0
);
error
=
GetLastError
();
todo_wine
{
ok
(
!
ret
,
"InternetTimeFromSystemTimeA should have returned FALSE
\n
"
);
ok
(
error
==
ERROR_INSUFFICIENT_BUFFER
,
"InternetTimeFromSystemTimeA failed with ERROR_INSUFFICIENT_BUFFER instead of %u
\n
"
,
error
);
}
}
static
void
InternetTimeFromSystemTimeW_test
(
void
)
...
...
@@ -804,12 +815,22 @@ static void InternetTimeFromSystemTimeW_test(void)
WCHAR
string
[
INTERNET_RFC1123_BUFSIZE
+
1
];
static
const
WCHAR
expect
[]
=
{
'F'
,
'r'
,
'i'
,
','
,
' '
,
'0'
,
'7'
,
' '
,
'J'
,
'a'
,
'n'
,
' '
,
'2'
,
'0'
,
'0'
,
'5'
,
' '
,
'1'
,
'2'
,
':'
,
'0'
,
'6'
,
':'
,
'3'
,
'5'
,
' '
,
'G'
,
'M'
,
'T'
,
0
};
DWORD
error
;
ret
=
pInternetTimeFromSystemTimeW
(
&
time
,
INTERNET_RFC1123_FORMAT
,
string
,
sizeof
(
string
)
);
ok
(
ret
,
"InternetTimeFromSystemTimeW failed (%u)
\n
"
,
GetLastError
()
);
ok
(
!
memcmp
(
string
,
expect
,
sizeof
(
expect
)
),
"InternetTimeFromSystemTimeW failed (%u)
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeW
(
&
time
,
INTERNET_RFC1123_FORMAT
,
string
,
sizeof
(
string
)
/
sizeof
(
string
[
0
])
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeW should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INSUFFICIENT_BUFFER
,
"InternetTimeFromSystemTimeW failed with ERROR_INSUFFICIENT_BUFFER instead of %u
\n
"
,
error
);
}
static
void
InternetTimeToSystemTimeA_test
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment