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
ffd855d2
Commit
ffd855d2
authored
Apr 27, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Apr 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Run tests again on several platforms due to missing functions.
parent
75f6b1d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
sock.c
dlls/ws2_32/tests/sock.c
+20
-11
No files found.
dlls/ws2_32/tests/sock.c
View file @
ffd855d2
...
...
@@ -56,7 +56,8 @@
} while (0);
/* Function pointers */
static
HMODULE
hws2_32
=
0
;
static
void
(
WINAPI
*
pFreeAddrInfoW
)(
PADDRINFOW
)
=
0
;
static
int
(
WINAPI
*
pGetAddrInfoW
)(
LPCWSTR
,
LPCWSTR
,
const
ADDRINFOW
*
,
PADDRINFOW
*
)
=
0
;
static
PCSTR
(
WINAPI
*
pInetNtop
)(
INT
,
LPVOID
,
LPSTR
,
ULONG
)
=
0
;
/**************** Structs and typedefs ***************/
...
...
@@ -841,6 +842,11 @@ static void Init (void)
{
WORD
ver
=
MAKEWORD
(
2
,
2
);
WSADATA
data
;
HMODULE
hws2_32
=
GetModuleHandle
(
"ws2_32.dll"
);
pFreeAddrInfoW
=
(
void
*
)
GetProcAddress
(
hws2_32
,
"FreeAddrInfoW"
);
pGetAddrInfoW
=
(
void
*
)
GetProcAddress
(
hws2_32
,
"GetAddrInfoW"
);
pInetNtop
=
(
void
*
)
GetProcAddress
(
hws2_32
,
"inet_ntop"
);
ok
(
WSAStartup
(
ver
,
&
data
)
==
0
,
"WSAStartup failed
\n
"
);
tls
=
TlsAlloc
();
...
...
@@ -2016,9 +2022,6 @@ static void test_addr_to_print(void)
u_char
addr3_Num
[
16
]
=
{
0x20
,
0x30
,
0xa4
,
0xb1
};
PCSTR
addr3_Str
=
"2030:a4b1::"
;
hws2_32
=
GetModuleHandle
(
"ws2_32.dll"
);
pInetNtop
=
(
void
*
)
GetProcAddress
(
hws2_32
,
"inet_ntop"
);
in
.
s_addr
=
addr0_Num
;
pdst
=
inet_ntoa
(
*
((
struct
in_addr
*
)
&
in
.
s_addr
));
...
...
@@ -2382,22 +2385,28 @@ static void test_GetAddrInfoW(void)
int
ret
;
ADDRINFOW
*
result
,
hint
;
if
(
!
pGetAddrInfoW
||
!
pFreeAddrInfoW
)
{
win_skip
(
"GetAddrInfoW and/or FreeAddrInfoW not present
\n
"
);
return
;
}
memset
(
&
hint
,
0
,
sizeof
(
ADDRINFOW
));
ret
=
GetAddrInfoW
(
NULL
,
NULL
,
NULL
,
&
result
);
ret
=
p
GetAddrInfoW
(
NULL
,
NULL
,
NULL
,
&
result
);
ok
(
ret
==
WSAHOST_NOT_FOUND
,
"got %d expected WSAHOST_NOT_FOUND
\n
"
,
ret
);
ret
=
GetAddrInfoW
(
localhost
,
NULL
,
NULL
,
&
result
);
ret
=
p
GetAddrInfoW
(
localhost
,
NULL
,
NULL
,
&
result
);
ok
(
!
ret
,
"GetAddrInfoW failed with %d
\n
"
,
WSAGetLastError
());
FreeAddrInfoW
(
result
);
p
FreeAddrInfoW
(
result
);
ret
=
GetAddrInfoW
(
localhost
,
port
,
NULL
,
&
result
);
ret
=
p
GetAddrInfoW
(
localhost
,
port
,
NULL
,
&
result
);
ok
(
!
ret
,
"GetAddrInfoW failed with %d
\n
"
,
WSAGetLastError
());
FreeAddrInfoW
(
result
);
p
FreeAddrInfoW
(
result
);
ret
=
GetAddrInfoW
(
localhost
,
port
,
&
hint
,
&
result
);
ret
=
p
GetAddrInfoW
(
localhost
,
port
,
&
hint
,
&
result
);
ok
(
!
ret
,
"GetAddrInfoW failed with %d
\n
"
,
WSAGetLastError
());
FreeAddrInfoW
(
result
);
p
FreeAddrInfoW
(
result
);
}
/**************** 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