http://bugs.winehq.org/show_bug.cgi?id=11965
--- Comment #9 from Juan Lang juan_lang@yahoo.com 2008-10-24 13:08:48 --- (In reply to comment #8)
I don't know if it's OK to have conditions on calling ok() as it's the first time I write a wine test.
Yes, that's fine.
Any suggestion/patch/improvement on this testcase are welcome.
You'll get more feedback if you send it as a patch to wine-patches or wine-devel.
ok(ptr == NULL, "gethostbyname() succeeded unexpectedly: %d\n", WSAGetLastError()); Since this currently fails on Wine, you'll need a todo_wine before the ok.
res = WSAStartup( version, &data );
ok(res != 0, "WSAStartup() failed unexpectedly: %d\n", res); if (res != 0) return; // test can't continue
This is preferred style for the if (res != 0) block: if (res != 0) { skip("WSAStartup failed\n"); return; } Don't use C++-style (//) comments.
Also, this test could probably be part of an existing .c file, it doesn't really need its own.