ws2_32/tests: Add one more SO_ERROR test.

This commit is contained in:
Bruno Jesus 2015-04-14 02:02:08 -03:00 committed by Alexandre Julliard
parent a9a80b56b1
commit 383ed3ce9a
1 changed files with 10 additions and 0 deletions

View File

@ -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);