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
b159f6e2
Commit
b159f6e2
authored
Aug 02, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Add tests for inet_addr().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
53fe477d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
protocol.c
dlls/ws2_32/tests/protocol.c
+12
-9
No files found.
dlls/ws2_32/tests/protocol.c
View file @
b159f6e2
...
...
@@ -942,6 +942,11 @@ static void test_inet_pton(void)
ok
(
ret
==
-
1
,
"got %d
\n
"
,
ret
);
ok
(
WSAGetLastError
()
==
WSAEAFNOSUPPORT
,
"got error %u
\n
"
,
WSAGetLastError
());
WSASetLastError
(
0xdeadbeef
);
ret
=
inet_addr
(
NULL
);
ok
(
ret
==
INADDR_NONE
,
"got %#x
\n
"
,
ret
);
todo_wine
ok
(
WSAGetLastError
()
==
WSAEFAULT
,
"got error %u
\n
"
,
WSAGetLastError
());
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
ipv4_tests
);
++
i
)
{
WCHAR
inputW
[
32
];
...
...
@@ -963,6 +968,13 @@ static void test_inet_pton(void)
ok
(
WSAGetLastError
()
==
(
ret
?
0xdeadbeef
:
WSAEINVAL
),
"%s: got error %u
\n
"
,
debugstr_a
(
ipv4_tests
[
i
].
input
),
WSAGetLastError
());
ok
(
addr
==
ipv4_tests
[
i
].
addr
,
"%s: got addr %#08x
\n
"
,
debugstr_a
(
ipv4_tests
[
i
].
input
),
addr
);
WSASetLastError
(
0xdeadbeef
);
addr
=
inet_addr
(
ipv4_tests
[
i
].
input
);
ok
(
addr
==
ipv4_tests
[
i
].
ret
?
ipv4_tests
[
i
].
addr
:
INADDR_NONE
,
"%s: got addr %#08x
\n
"
,
debugstr_a
(
ipv4_tests
[
i
].
input
),
addr
);
ok
(
WSAGetLastError
()
==
0xdeadbeef
,
"%s: got error %u
\n
"
,
debugstr_a
(
ipv4_tests
[
i
].
input
),
WSAGetLastError
());
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
ipv6_tests
);
++
i
)
...
...
@@ -1505,14 +1517,6 @@ static void test_WSAStringToAddress(void)
}
}
static
void
test_inet_addr
(
void
)
{
u_long
addr
;
addr
=
inet_addr
(
NULL
);
ok
(
addr
==
INADDR_NONE
,
"inet_addr succeeded unexpectedly
\n
"
);
}
/* Tests used in both getaddrinfo and GetAddrInfoW */
static
const
struct
addr_hint_tests
{
...
...
@@ -2818,7 +2822,6 @@ START_TEST( protocol )
test_addr_to_print
();
test_WSAAddressToString
();
test_WSAStringToAddress
();
test_inet_addr
();
test_GetAddrInfoW
();
test_GetAddrInfoExW
();
...
...
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