ws2_32/tests: Move second WSACleanup test elsewhere.

This commit is contained in:
Bruno Jesus 2015-03-08 01:05:45 -03:00 committed by Alexandre Julliard
parent e928f5544e
commit 2522e205ec
1 changed files with 8 additions and 6 deletions

View File

@ -1124,7 +1124,14 @@ static void test_WithWSAStartup(void)
closesocket(src); closesocket(src);
closesocket(dst); 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 ***************/ /**************** Main program utility functions ***************/
@ -1156,11 +1163,6 @@ static void Exit (void)
ret = WSACleanup(); ret = WSACleanup();
err = WSAGetLastError(); err = WSAGetLastError();
ok ( ret == 0, "WSACleanup failed ret = %d GetLastError is %d\n", ret, err); 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, static void StartServer (LPTHREAD_START_ROUTINE routine,