Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
551e243c
Commit
551e243c
authored
Nov 04, 2005
by
Saulius Krasuckas
Committed by
Alexandre Julliard
Nov 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make 4 WSAStringToAddress* tests don't fail on Win9x.
parent
2045ed22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
sock.c
dlls/winsock/tests/sock.c
+17
-8
No files found.
dlls/winsock/tests/sock.c
View file @
551e243c
...
...
@@ -1179,6 +1179,7 @@ static void test_WSAStringToAddressA(void)
{
INT
ret
,
len
;
SOCKADDR_IN
sockaddr
;
int
GLE
;
CHAR
address1
[]
=
"0.0.0.0"
;
CHAR
address2
[]
=
"127.127.127.127"
;
...
...
@@ -1214,8 +1215,10 @@ static void test_WSAStringToAddressA(void)
sockaddr
.
sin_addr
.
s_addr
=
0
;
ret
=
WSAStringToAddressA
(
address3
,
AF_INET
,
NULL
,
(
SOCKADDR
*
)
&
sockaddr
,
&
len
);
ok
(
!
ret
&&
sockaddr
.
sin_addr
.
s_addr
==
0xffffffff
,
"WSAStringToAddressA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
GLE
=
WSAGetLastError
();
ok
(
(
ret
==
0
&&
sockaddr
.
sin_addr
.
s_addr
==
0xffffffff
)
||
(
ret
==
SOCKET_ERROR
&&
GLE
==
ERROR_INVALID_PARAMETER
),
"WSAStringToAddressA() failed unexpectedly: %d
\n
"
,
GLE
);
len
=
sizeof
(
sockaddr
);
sockaddr
.
sin_port
=
0
;
...
...
@@ -1230,14 +1233,17 @@ static void test_WSAStringToAddressA(void)
sockaddr
.
sin_addr
.
s_addr
=
0
;
ret
=
WSAStringToAddressA
(
address5
,
AF_INET
,
NULL
,
(
SOCKADDR
*
)
&
sockaddr
,
&
len
);
ok
(
!
ret
&&
sockaddr
.
sin_addr
.
s_addr
==
0xffffffff
&&
sockaddr
.
sin_port
==
0xffff
,
"WSAStringToAddressA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
GLE
=
WSAGetLastError
();
ok
(
(
ret
==
0
&&
sockaddr
.
sin_addr
.
s_addr
==
0xffffffff
&&
sockaddr
.
sin_port
==
0xffff
)
||
(
ret
==
SOCKET_ERROR
&&
GLE
==
ERROR_INVALID_PARAMETER
),
"WSAStringToAddressA() failed unexpectedly: %d
\n
"
,
GLE
);
}
static
void
test_WSAStringToAddressW
(
void
)
{
INT
ret
,
len
;
SOCKADDR_IN
sockaddr
;
int
GLE
;
WCHAR
address1
[]
=
{
'0'
,
'.'
,
'0'
,
'.'
,
'0'
,
'.'
,
'0'
,
0
};
WCHAR
address2
[]
=
{
'1'
,
'2'
,
'7'
,
'.'
,
'1'
,
'2'
,
'7'
,
'.'
,
'1'
,
'2'
,
'7'
,
'.'
,
'1'
,
'2'
,
'7'
,
0
};
...
...
@@ -1275,8 +1281,10 @@ static void test_WSAStringToAddressW(void)
sockaddr
.
sin_addr
.
s_addr
=
0
;
ret
=
WSAStringToAddressW
(
address3
,
AF_INET
,
NULL
,
(
SOCKADDR
*
)
&
sockaddr
,
&
len
);
ok
(
!
ret
&&
sockaddr
.
sin_addr
.
s_addr
==
0xffffffff
,
"WSAStringToAddressW() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
GLE
=
WSAGetLastError
();
ok
(
(
ret
==
0
&&
sockaddr
.
sin_addr
.
s_addr
==
0xffffffff
)
||
(
ret
==
SOCKET_ERROR
&&
GLE
==
ERROR_INVALID_PARAMETER
),
"WSAStringToAddressW() failed unexpectedly: %d
\n
"
,
GLE
);
len
=
sizeof
(
sockaddr
);
sockaddr
.
sin_port
=
0
;
...
...
@@ -1291,8 +1299,9 @@ static void test_WSAStringToAddressW(void)
sockaddr
.
sin_addr
.
s_addr
=
0
;
ret
=
WSAStringToAddressW
(
address5
,
AF_INET
,
NULL
,
(
SOCKADDR
*
)
&
sockaddr
,
&
len
);
ok
(
!
ret
&&
sockaddr
.
sin_addr
.
s_addr
==
0xffffffff
&&
sockaddr
.
sin_port
==
0xffff
,
"WSAStringToAddressW() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
(
ret
==
0
&&
sockaddr
.
sin_addr
.
s_addr
==
0xffffffff
&&
sockaddr
.
sin_port
==
0xffff
)
||
(
ret
==
SOCKET_ERROR
&&
(
GLE
==
ERROR_INVALID_PARAMETER
||
GLE
==
WSAEINVAL
)),
"WSAStringToAddressW() failed unexpectedly: %d
\n
"
,
GLE
);
}
/**************** Main program ***************/
...
...
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