Bruno Jesus : ws2_32/tests: Add one more SO_ERROR test.
Module: wine Branch: master Commit: 383ed3ce9a98ff8fbd520dc418dbad68698fae23 URL: http://source.winehq.org/git/wine.git/?a=commit;h=383ed3ce9a98ff8fbd520dc418... Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Tue Apr 14 02:02:08 2015 -0300 ws2_32/tests: Add one more SO_ERROR test. --- dlls/ws2_32/tests/sock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index c7b3ea7..aa06a08 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1387,6 +1387,16 @@ todo_wine err, WSAGetLastError()); closesocket(s); + /* Test with the closed socket */ + SetLastError(0xdeadbeef); + size = sizeof(i); + i = 1234; + err = getsockopt(s, SOL_SOCKET, SO_ERROR, (char *) &i, &size); +todo_wine + ok( (err == SOCKET_ERROR) && (WSAGetLastError() == WSAENOTSOCK), + "got %d with %d (expected SOCKET_ERROR with WSAENOTSOCK)\n", + err, WSAGetLastError()); + ok (i == 1234, "expected 1234, got %d\n", i); /* Test WS_IP_MULTICAST_TTL with 8, 16, 24 and 32 bits values */ s = socket(AF_INET, SOCK_DGRAM, 0);
participants (1)
-
Alexandre Julliard