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
02c199be
Commit
02c199be
authored
Jan 17, 2013
by
Bruno Jesus
Committed by
Alexandre Julliard
Jan 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Add SO_ERROR [set|get]sockopt tests.
parent
0d0f7050
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
sock.c
dlls/ws2_32/tests/sock.c
+28
-0
No files found.
dlls/ws2_32/tests/sock.c
View file @
02c199be
...
...
@@ -1192,6 +1192,34 @@ static void test_set_getsockopt(void)
"got %d with %d (expected SOCKET_ERROR with WSAEINVAL)
\n
"
,
err
,
WSAGetLastError
());
/* Test SO_ERROR set/get */
SetLastError
(
0xdeadbeef
);
i
=
1234
;
err
=
setsockopt
(
s
,
SOL_SOCKET
,
SO_ERROR
,
(
char
*
)
&
i
,
size
);
todo_wine
ok
(
!
err
&&
!
WSAGetLastError
(),
"got %d with %d (expected 0 with 0)
\n
"
,
err
,
WSAGetLastError
());
SetLastError
(
0xdeadbeef
);
i
=
4321
;
err
=
getsockopt
(
s
,
SOL_SOCKET
,
SO_ERROR
,
(
char
*
)
&
i
,
&
size
);
todo_wine
ok
(
!
err
&&
!
WSAGetLastError
(),
"got %d with %d (expected 0 with 0)
\n
"
,
err
,
WSAGetLastError
());
todo_wine
ok
(
i
==
1234
,
"got %d (expected 1234)
\n
"
,
i
);
/* Test invalid optlen */
SetLastError
(
0xdeadbeef
);
size
=
1
;
err
=
getsockopt
(
s
,
SOL_SOCKET
,
SO_ERROR
,
(
char
*
)
&
i
,
&
size
);
todo_wine
ok
(
(
err
==
SOCKET_ERROR
)
&&
(
WSAGetLastError
()
==
WSAEFAULT
),
"got %d with %d (expected SOCKET_ERROR with WSAEFAULT)
\n
"
,
err
,
WSAGetLastError
());
closesocket
(
s
);
}
...
...
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