Hi Jeff, I have a stylistic complaint about your tests in this patch:
+ if(sock == INVALID_SOCKET) + { + ok(0, "Creating the socket failed: %d, skipping test\n", WSAGetLastError()); + return; + } If you intend to skip a test, shouldn't you use skip instead?
+ ret = ioctlsocket(sock, cmds[i], (u_long *)1); + if(ret != SOCKET_ERROR) + ok(0, "ioctlsocket succeeded unexpectedly\n"); + else + { I'm not a fan of the ok(0) approach here. Why not use ok(ret == SOCKET_ERROR) instead? --Juan
On Wed, Sep 10, 2008 at 2:57 AM, Juan Lang juan.lang@gmail.com wrote:
Hi Jeff, I have a stylistic complaint about your tests in this patch:
- if(sock == INVALID_SOCKET)
- {
ok(0, "Creating the socket failed: %d, skipping test\n",
WSAGetLastError());
return;
- }
If you intend to skip a test, shouldn't you use skip instead?
ret = ioctlsocket(sock, cmds[i], (u_long *)1);
if(ret != SOCKET_ERROR)
ok(0, "ioctlsocket succeeded unexpectedly\n");
else
{
I'm not a fan of the ok(0) approach here. Why not use ok(ret == SOCKET_ERROR) instead? --Juan
Good point, I'll use skip instead and for your second concern, I guess I can use the return value of ok(ret == SOCKET_ERROR,.. in an if expression.
I'll resend.
Thanks -Jeff