[WS2_32_APITEST] Improve the existing PCH and make use of it.

This commit is contained in:
Amine Khaldi 2017-12-21 13:36:04 +01:00
parent 823270e608
commit b09a63709b
18 changed files with 28 additions and 112 deletions

View File

@ -16,10 +16,11 @@ list(APPEND SOURCE
WSAIoctl.c
WSARecv.c
WSAStartup.c
testlist.c)
ws2_32.h)
add_executable(ws2_32_apitest ${SOURCE})
add_executable(ws2_32_apitest ${SOURCE} testlist.c)
target_link_libraries(ws2_32_apitest wine ${PSEH_LIB})
set_module_type(ws2_32_apitest win32cui)
add_importlibs(ws2_32_apitest ws2_32 msvcrt iphlpapi kernel32 ntdll)
add_pch(ws2_32_apitest ws2_32.h SOURCE)
add_rostests_file(TARGET ws2_32_apitest)

View File

@ -5,11 +5,7 @@
* PROGRAMMERS: Miroslav Mastny
*/
#include <apitest.h>
#include <stdio.h>
#include <windows.h>
#include <winsock2.h>
#include "ws2_32.h"
#define SVR_PORT 5000
#define WAIT_TIMEOUT_ 10000

View File

@ -6,11 +6,9 @@
* PROGRAMMERS: Andreas Maier
*/
#include <apitest.h>
#include "ws2_32.h"
#include <stdio.h>
#include "ws2tcpip.h"
#include "iphlpapi.h"
#include <iphlpapi.h>
void traceaddr(char* txt, sockaddr_gen a)
{

View File

@ -5,11 +5,6 @@
* PROGRAMMERS: Peter Hater
*/
#include <apitest.h>
#include <stdio.h>
#include <ntstatus.h>
#include <wine/winternl.h>
#include "ws2_32.h"
#define RECV_BUF 4

View File

@ -5,15 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#include <apitest.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <windef.h>
#include <winsock2.h>
#include <ndk/rtlfuncs.h>
#include <ndk/mmfuncs.h>
#include "ws2_32.h"
static
PVOID

View File

@ -5,16 +5,7 @@
* PROGRAMMER: Peter Hater
*/
#include <apitest.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <ws2tcpip.h>
#include <ndk/umtypes.h>
#include "ws2_32.h"
CHAR LocalAddress[sizeof("255.255.255.255")];
#define PORT 58888

View File

@ -5,11 +5,6 @@
* PROGRAMMERS: Peter Hater
*/
#include <apitest.h>
#include <stdio.h>
#include <ntstatus.h>
#include <wine/winternl.h>
#include "ws2_32.h"
void Test_CloseDuplicatedSocket()

View File

@ -5,16 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#include <apitest.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <ws2tcpip.h>
#include <ndk/umtypes.h>
#include "ws2_32.h"
#define ok_addrinfo(ai, flags, family, socktype, protocol, addrlen) do \
{ \

View File

@ -5,16 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#include <apitest.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <ws2tcpip.h>
#include <ndk/umtypes.h>
#include "ws2_32.h"
START_TEST(getnameinfo)
{

View File

@ -5,15 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#include <apitest.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <ws2tcpip.h>
#include "ws2_32.h"
START_TEST(getservbyname)
{

View File

@ -5,15 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#include <apitest.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <ws2tcpip.h>
#include "ws2_32.h"
START_TEST(getservbyport)
{

View File

@ -6,9 +6,6 @@
* COPYRIGHT: Copyright 2008 Colin Finck <mail@colinfinck.de>
*/
#include <apitest.h>
#include <stdio.h>
#include "ws2_32.h"
int CreateSocket(SOCKET* psck)

View File

@ -5,9 +5,6 @@
* PROGRAMMERS: Colin Finck
*/
#include <apitest.h>
#include <stdio.h>
#include "ws2_32.h"
int Test_ioctlsocket()

View File

@ -5,11 +5,7 @@
* PROGRAMMERS: Peter Hater
*/
#include <apitest.h>
#include <stdio.h>
#include <windows.h>
#include <winsock2.h>
#include "ws2_32.h"
#define SVR_PORT 5000
#define WAIT_TIMEOUT_ 10000

View File

@ -5,16 +5,7 @@
* PROGRAMMER: Sylvain Petreolle <sylvain.petreolle@reactos.org>
*/
#include <apitest.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <windef.h>
#include <winsock2.h>
#include <ndk/rtlfuncs.h>
#include <ndk/mmfuncs.h>
#include "ws2_32.h"
// This test depends on WSAStartup not having been called
START_TEST(nostartup)

View File

@ -5,13 +5,12 @@
* PROGRAMMERS: Colin Finck
*/
#include <apitest.h>
#include <stdio.h>
#include <ntstatus.h>
#include <wine/winternl.h>
#include "ws2_32.h"
#include <ndk/exfuncs.h>
#include <ndk/iofuncs.h>
#include <ndk/obfuncs.h>
#define RECV_BUF 4
/* For valid test results, the ReactOS Website needs to return at least 8 bytes on a "GET / HTTP/1.0" request.

View File

@ -5,12 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#include <apitest.h>
#include <winsock2.h>
#define WIN32_NO_STATUS
#include <ndk/mmfuncs.h>
#include <ndk/rtlfuncs.h>
#include "ws2_32.h"
static
PVOID

View File

@ -9,10 +9,17 @@
#ifndef _WS2_32_APITESTS_H
#define _WS2_32_APITESTS_H
#include <ntstatus.h>
#include <stdio.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <winsock2.h>
#include <apitest.h>
#include <ws2tcpip.h>
#include <ndk/rtlfuncs.h>
#include <ndk/mmfuncs.h>
/* Simple macro for executing a socket command and doing cleanup operations in case of a failure */
#define SCKTEST(_cmd_) \
@ -34,4 +41,4 @@ int GetRequestAndWait(SOCKET sck);
/* ws2_32.c */
extern HANDLE g_hHeap;
#endif
#endif /* !_WS2_32_APITESTS_H */