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
2584323f
Commit
2584323f
authored
Oct 03, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Oct 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Add tests for passing invalid parameters into InternetTimeFromSystemTimeA/W.
parent
ab849ee2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
internet.c
dlls/wininet/tests/internet.c
+62
-0
No files found.
dlls/wininet/tests/internet.c
View file @
2584323f
...
...
@@ -381,6 +381,37 @@ static void InternetTimeFromSystemTimeA_test(void)
ok
(
!
memcmp
(
string
,
expect
,
sizeof
(
expect
)
),
"InternetTimeFromSystemTimeA failed (%u)
\n
"
,
GetLastError
()
);
/* test NULL time parameter */
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeA
(
NULL
,
INTERNET_RFC1123_FORMAT
,
string
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeA should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
/* test NULL string parameter */
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeA
(
&
time
,
INTERNET_RFC1123_FORMAT
,
NULL
,
sizeof
(
string
)
);
error
=
GetLastError
();
todo_wine
ok
(
!
ret
,
"InternetTimeFromSystemTimeA should have returned FALSE
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
/* test invalid format parameter */
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeA
(
&
time
,
INTERNET_RFC1123_FORMAT
+
1
,
string
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeA should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
/* test too small buffer size */
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeA
(
&
time
,
INTERNET_RFC1123_FORMAT
,
string
,
0
);
error
=
GetLastError
();
...
...
@@ -405,6 +436,37 @@ static void InternetTimeFromSystemTimeW_test(void)
ok
(
!
memcmp
(
string
,
expect
,
sizeof
(
expect
)
),
"InternetTimeFromSystemTimeW failed (%u)
\n
"
,
GetLastError
()
);
/* test NULL time parameter */
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeW
(
NULL
,
INTERNET_RFC1123_FORMAT
,
string
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeW should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
/* test NULL string parameter */
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeW
(
&
time
,
INTERNET_RFC1123_FORMAT
,
NULL
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeW should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
/* test invalid format parameter */
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeW
(
&
time
,
INTERNET_RFC1123_FORMAT
+
1
,
string
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeW should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
/* test too small buffer size */
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeW
(
&
time
,
INTERNET_RFC1123_FORMAT
,
string
,
sizeof
(
string
)
/
sizeof
(
string
[
0
])
);
error
=
GetLastError
();
...
...
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