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
b53edc6d
Commit
b53edc6d
authored
Nov 16, 2010
by
Greg Geldorp
Committed by
Alexandre Julliard
Nov 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: NT4 and Win2000 print IPv6 addresses a little bit differently.
parent
7fe77b63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
12 deletions
+57
-12
sock.c
dlls/ws2_32/tests/sock.c
+57
-12
No files found.
dlls/ws2_32/tests/sock.c
View file @
b53edc6d
...
...
@@ -1350,8 +1350,13 @@ static void test_WSAAddressToStringA(void)
CHAR
expect6_1
[]
=
"::1"
;
CHAR
expect6_2
[]
=
"20ab::1"
;
CHAR
expect6_3
[]
=
"[20ab::2001]:33274"
;
CHAR
expect6_3_nt
[]
=
"20ab::2001@33274"
;
CHAR
expect6_3_w2k
[]
=
"20ab::2001"
;
CHAR
expect6_3_2
[]
=
"[20ab::2001%4660]:33274"
;
CHAR
expect6_3_2_nt
[]
=
"4660/20ab::2001@33274"
;
CHAR
expect6_3_2_w2k
[]
=
"20ab::2001%4660"
;
CHAR
expect6_3_3
[]
=
"20ab::2001%4660"
;
CHAR
expect6_3_3_nt
[]
=
"4660/20ab::2001"
;
len
=
0
;
...
...
@@ -1454,8 +1459,14 @@ static void test_WSAAddressToStringA(void)
ret
=
WSAAddressToStringA
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
!
strcmp
(
address6
,
expect6_3
),
"Expected: %s, got: %s
\n
"
,
expect6_3
,
address6
);
ok
(
len
==
sizeof
(
expect6_3
),
"Got size %d
\n
"
,
len
);
ok
(
!
strcmp
(
address6
,
expect6_3
)
||
broken
(
!
strcmp
(
address6
,
expect6_3_nt
)
)
||
/* NT4 */
broken
(
!
strcmp
(
address6
,
expect6_3_w2k
)
),
/* Win2000 */
"Expected: %s, got: %s
\n
"
,
expect6_3
,
address6
);
ok
(
len
==
sizeof
(
expect6_3
)
||
broken
(
len
==
sizeof
(
expect6_3_nt
)
)
||
/* NT4 */
broken
(
len
==
sizeof
(
expect6_3_w2k
)
),
/* Win2000 */
"Got size %d
\n
"
,
len
);
/* Test IPv6 address, port number and scope_id */
len
=
sizeof
(
address6
);
...
...
@@ -1467,8 +1478,14 @@ static void test_WSAAddressToStringA(void)
ret
=
WSAAddressToStringA
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
!
strcmp
(
address6
,
expect6_3_2
),
"Expected: %s, got: %s
\n
"
,
expect6_3_2
,
address6
);
ok
(
len
==
sizeof
(
expect6_3_2
),
"Got size %d
\n
"
,
len
);
ok
(
!
strcmp
(
address6
,
expect6_3_2
)
||
broken
(
!
strcmp
(
address6
,
expect6_3_2_nt
)
)
||
/* NT4 */
broken
(
!
strcmp
(
address6
,
expect6_3_2_w2k
)
),
/* Win2000 */
"Expected: %s, got: %s
\n
"
,
expect6_3_2
,
address6
);
ok
(
len
==
sizeof
(
expect6_3_2
)
||
broken
(
len
==
sizeof
(
expect6_3_2_nt
)
)
||
/* NT4 */
broken
(
len
==
sizeof
(
expect6_3_2_w2k
)
),
/* Win2000 */
"Got size %d
\n
"
,
len
);
/* Test IPv6 address and scope_id */
len
=
sizeof
(
address6
);
...
...
@@ -1480,8 +1497,12 @@ static void test_WSAAddressToStringA(void)
ret
=
WSAAddressToStringA
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
!
strcmp
(
address6
,
expect6_3_3
),
"Expected: %s, got: %s
\n
"
,
expect6_3_3
,
address6
);
ok
(
len
==
sizeof
(
expect6_3_3
),
"Got size %d
\n
"
,
len
);
ok
(
!
strcmp
(
address6
,
expect6_3_3
)
||
broken
(
!
strcmp
(
address6
,
expect6_3_3_nt
)
),
/* NT4 */
"Expected: %s, got: %s
\n
"
,
expect6_3_3
,
address6
);
ok
(
len
==
sizeof
(
expect6_3_3
)
||
broken
(
len
==
sizeof
(
expect6_3_3_nt
)
),
/* NT4 */
"Got size %d
\n
"
,
len
);
end:
if
(
v6
!=
INVALID_SOCKET
)
...
...
@@ -1513,8 +1534,13 @@ static void test_WSAAddressToStringW(void)
WCHAR
expect6_1
[]
=
{
':'
,
':'
,
'1'
,
0
};
WCHAR
expect6_2
[]
=
{
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'1'
,
0
};
WCHAR
expect6_3
[]
=
{
'['
,
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'2'
,
'0'
,
'0'
,
'1'
,
']'
,
':'
,
'3'
,
'3'
,
'2'
,
'7'
,
'4'
,
0
};
WCHAR
expect6_3_nt
[]
=
{
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'2'
,
'0'
,
'0'
,
'1'
,
'@'
,
'3'
,
'3'
,
'2'
,
'7'
,
'4'
,
0
};
WCHAR
expect6_3_w2k
[]
=
{
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'2'
,
'0'
,
'0'
,
'1'
,
0
};
WCHAR
expect6_3_2
[]
=
{
'['
,
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'2'
,
'0'
,
'0'
,
'1'
,
'%'
,
'4'
,
'6'
,
'6'
,
'0'
,
']'
,
':'
,
'3'
,
'3'
,
'2'
,
'7'
,
'4'
,
0
};
WCHAR
expect6_3_2_nt
[]
=
{
'4'
,
'6'
,
'6'
,
'0'
,
'/'
,
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'2'
,
'0'
,
'0'
,
'1'
,
'@'
,
'3'
,
'3'
,
'2'
,
'7'
,
'4'
,
0
};
WCHAR
expect6_3_2_w2k
[]
=
{
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'2'
,
'0'
,
'0'
,
'1'
,
'%'
,
'4'
,
'6'
,
'6'
,
'0'
,
0
};
WCHAR
expect6_3_3
[]
=
{
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'2'
,
'0'
,
'0'
,
'1'
,
'%'
,
'6'
,
'5'
,
'5'
,
'3'
,
'4'
,
0
};
WCHAR
expect6_3_3_nt
[]
=
{
'6'
,
'5'
,
'5'
,
'3'
,
'4'
,
'/'
,
'2'
,
'0'
,
'a'
,
'b'
,
':'
,
':'
,
'2'
,
'0'
,
'0'
,
'1'
,
0
};
len
=
0
;
...
...
@@ -1619,8 +1645,15 @@ static void test_WSAAddressToStringW(void)
ret
=
WSAAddressToStringW
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringW() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
!
lstrcmpW
(
address6
,
expect6_3
),
"Wrong string returned
\n
"
);
ok
(
len
==
sizeof
(
expect6_3
)
/
sizeof
(
WCHAR
),
"Got %d
\n
"
,
len
);
ok
(
!
lstrcmpW
(
address6
,
expect6_3
)
||
broken
(
!
lstrcmpW
(
address6
,
expect6_3_nt
)
)
||
/* NT4 */
broken
(
!
lstrcmpW
(
address6
,
expect6_3_w2k
)
),
/* Win2000 */
"Expected: %s, got: %s
\n
"
,
wine_dbgstr_w
(
expect6_3
),
wine_dbgstr_w
(
address6
)
);
ok
(
len
==
sizeof
(
expect6_3
)
/
sizeof
(
WCHAR
)
||
broken
(
len
==
sizeof
(
expect6_3_nt
)
/
sizeof
(
WCHAR
)
)
||
/* NT4 */
broken
(
len
==
sizeof
(
expect6_3_w2k
)
/
sizeof
(
WCHAR
)
),
/* Win2000 */
"Got %d
\n
"
,
len
);
/* Test IPv6 address, port number and scope_id */
len
=
sizeof
(
address6
)
/
sizeof
(
WCHAR
);
...
...
@@ -1632,8 +1665,15 @@ static void test_WSAAddressToStringW(void)
ret
=
WSAAddressToStringW
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringW() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
!
lstrcmpW
(
address6
,
expect6_3_2
),
"Wrong string returned
\n
"
);
ok
(
len
==
sizeof
(
expect6_3_2
)
/
sizeof
(
WCHAR
),
"Got %d
\n
"
,
len
);
ok
(
!
lstrcmpW
(
address6
,
expect6_3_2
)
||
broken
(
!
lstrcmpW
(
address6
,
expect6_3_2_nt
)
)
||
/* NT4 */
broken
(
!
lstrcmpW
(
address6
,
expect6_3_2_w2k
)
),
/* Win2000 */
"Expected: %s, got: %s
\n
"
,
wine_dbgstr_w
(
expect6_3_2
),
wine_dbgstr_w
(
address6
)
);
ok
(
len
==
sizeof
(
expect6_3_2
)
/
sizeof
(
WCHAR
)
||
broken
(
len
==
sizeof
(
expect6_3_2_nt
)
/
sizeof
(
WCHAR
)
)
||
/* NT4 */
broken
(
len
==
sizeof
(
expect6_3_2_w2k
)
/
sizeof
(
WCHAR
)
),
/* Win2000 */
"Got %d
\n
"
,
len
);
/* Test IPv6 address and scope_id */
len
=
sizeof
(
address6
)
/
sizeof
(
WCHAR
);
...
...
@@ -1645,8 +1685,13 @@ static void test_WSAAddressToStringW(void)
ret
=
WSAAddressToStringW
(
(
SOCKADDR
*
)
&
sockaddr6
,
sizeof
(
sockaddr6
),
NULL
,
address6
,
&
len
);
ok
(
!
ret
,
"WSAAddressToStringW() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
!
lstrcmpW
(
address6
,
expect6_3_3
),
"Wrong string returned
\n
"
);
ok
(
len
==
sizeof
(
expect6_3_3
)
/
sizeof
(
WCHAR
),
"Got %d
\n
"
,
len
);
ok
(
!
lstrcmpW
(
address6
,
expect6_3_3
)
||
broken
(
!
lstrcmpW
(
address6
,
expect6_3_3_nt
)
),
/* NT4 */
"Expected: %s, got: %s
\n
"
,
wine_dbgstr_w
(
expect6_3_3
),
wine_dbgstr_w
(
address6
)
);
ok
(
len
==
sizeof
(
expect6_3_3
)
/
sizeof
(
WCHAR
)
||
broken
(
len
==
sizeof
(
expect6_3_3_nt
)
/
sizeof
(
WCHAR
)
),
/* NT4 */
"Got %d
\n
"
,
len
);
end:
if
(
v6
!=
INVALID_SOCKET
)
...
...
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