Bruno Jesus : ws2_32/tests: Move second WSACleanup test elsewhere.
Module: wine Branch: master Commit: 2522e205ec5349d7ca5c13254abc70f474720610 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2522e205ec5349d7ca5c13254a... Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Sun Mar 8 01:05:45 2015 -0300 ws2_32/tests: Move second WSACleanup test elsewhere. --- dlls/ws2_32/tests/sock.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 7155a09..6ad4265 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1124,7 +1124,14 @@ static void test_WithWSAStartup(void) closesocket(src); closesocket(dst); - WSACleanup(); + res = WSACleanup(); + ok(res == 0, "expected 0, got %d\n", res); + WSASetLastError(0xdeadbeef); + res = WSACleanup(); + error = WSAGetLastError(); + ok ( (res == SOCKET_ERROR && error == WSANOTINITIALISED) || + broken(res == 0), /* WinME */ + "WSACleanup returned %d WSAGetLastError is %d\n", res, error); } /**************** Main program utility functions ***************/ @@ -1156,11 +1163,6 @@ static void Exit (void) ret = WSACleanup(); err = WSAGetLastError(); ok ( ret == 0, "WSACleanup failed ret = %d GetLastError is %d\n", ret, err); - ret = WSACleanup(); - err = WSAGetLastError(); - ok ( (ret == SOCKET_ERROR && err == WSANOTINITIALISED) || - broken(ret == 0), /* WinME */ - "WSACleanup returned %d GetLastError is %d\n", ret, err); } static void StartServer (LPTHREAD_START_ROUTINE routine,
participants (1)
-
Alexandre Julliard