[NTDLL_WINETEST] Add a PCH.

This commit is contained in:
Amine Khaldi 2017-12-20 13:07:06 +01:00
parent 9cfa608dcf
commit a76e7d13e2
21 changed files with 39 additions and 162 deletions

View file

@ -24,15 +24,13 @@ list(APPEND SOURCE
rtlstr.c
string.c
time.c
testlist.c)
ntdll_test.h)
if(ARCH STREQUAL "i386")
list(APPEND SOURCE
generated.c
)
list(APPEND SOURCE generated.c)
endif()
add_executable(ntdll_winetest ${SOURCE})
add_executable(ntdll_winetest ${SOURCE} testlist.c)
if(USE_CLANG_CL OR (NOT MSVC))
add_target_compile_flags(ntdll_winetest "-Wno-format")
@ -40,4 +38,5 @@ endif()
set_module_type(ntdll_winetest win32cui)
add_importlibs(ntdll_winetest user32 ole32 advapi32 msvcrt kernel32 ntdll)
add_pch(ntdll_winetest ntdll_test.h SOURCE)
add_rostests_file(TARGET ntdll_winetest)

View file

@ -21,22 +21,7 @@
* windows.
*/
#include <stdio.h>
#include <stdarg.h>
#include "ntstatus.h"
/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
* definition errors when we get to winnt.h
*/
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winnls.h"
#include "winuser.h"
#include "wine/test.h"
#include "wine/winternl.h"
#include "ntdll_test.h"
#ifndef __WINE_WINTERNL_H
typedef unsigned short RTL_ATOM, *PRTL_ATOM;

View file

@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <ntstatus.h>
#define WIN32_NO_STATUS
#include <windows.h>
#include <winnt.h>
#include <wine/winternl.h>
#include <winerror.h>
#include <stdio.h>
#include "wine/test.h"
#include "ntdll_test.h"
static NTSTATUS (WINAPI *pNtNotifyChangeDirectoryFile)(
HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,

View file

@ -24,18 +24,7 @@
* windows.
*/
#include <stdio.h>
#include <stdarg.h>
#include "ntstatus.h"
/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
* definition errors when we get to winnt.h
*/
#define WIN32_NO_STATUS
#include "wine/test.h"
#include "winnls.h"
#include "wine/winternl.h"
#include "ntdll_test.h"
static NTSTATUS (WINAPI *pNtClose)( PHANDLE );
static NTSTATUS (WINAPI *pNtOpenFile) ( PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, ULONG, ULONG );

View file

@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include "ntdll_test.h"
static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen,

View file

@ -19,19 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdio.h>
#include "ntdll_test.h"
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "wine/test.h"
#include "windef.h"
#include "winbase.h"
#include "rpcnterr.h"
#include "winreg.h"
#include "wine/winternl.h"
#include <rpcnterr.h>
/* FIXME!!! this test checks only mappings, defined by MSDN
* It is necessary to add other mappings and to test them

View file

@ -18,24 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdio.h>
#include "ntdll_test.h"
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x500 /* For NTSTATUS */
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "winreg.h"
#include "wine/winternl.h"
#include "wine/exception.h"
#include "wine/test.h"
#include <wine/exception.h>
static void *code_mem;

View file

@ -24,19 +24,7 @@
* windows.
*/
#include <stdio.h>
#include <stdarg.h>
#include "ntstatus.h"
/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
* definition errors when we get to winnt.h
*/
#define WIN32_NO_STATUS
#include "wine/test.h"
#include "wine/winternl.h"
#include "winuser.h"
#include "wine/winioctl.h"
#include "ntdll_test.h"
/* FIXME */
typedef struct _REPARSE_DATA_BUFFER {

View file

@ -5,16 +5,8 @@
* Unit tests for data structure packing
*/
#define WINVER 0x0501
#define _WIN32_IE 0x0501
#define _WIN32_WINNT 0x0501
#define WINE_NOWINSOCK
#include "ntdll_test.h"
#include "wine/test.h"
/***********************************************************************
* Compatibility macros
*/

View file

@ -19,8 +19,6 @@
*/
#include "ntdll_test.h"
#include <winnls.h>
#include <stdio.h>
static NTSTATUS (WINAPI * pRtlDowncaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);
static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);

View file

@ -21,11 +21,8 @@
* windows.
*/
#include <stdlib.h>
#include "ntdll_test.h"
/* Function ptrs for ntdll calls */
static HMODULE hntdll = 0;
static LONGLONG (WINAPI *pRtlExtendedMagicDivide)(LONGLONG, LONGLONG, INT);

View file

@ -18,14 +18,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#ifndef _NTDLL_TEST_H_
#define _NTDLL_TEST_H_
#include <stdio.h>
#include <ntstatus.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "winreg.h"
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include "wine/winternl.h"
#include "wine/test.h"
#include <wine/test.h>
#include <winuser.h>
#include <winnls.h>
#include <winioctl.h>
#include <wine/winternl.h>
#endif /* !_NTDLL_TEST_H_ */

View file

@ -20,10 +20,6 @@
*/
#include "ntdll_test.h"
#include "wine/winternl.h"
#include "stdio.h"
#include "winnt.h"
#include "stdlib.h"
static HANDLE (WINAPI *pCreateWaitableTimerA)(SECURITY_ATTRIBUTES*, BOOL, LPCSTR);
static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR);

View file

@ -17,19 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "winnls.h"
#include "wine/test.h"
#include "wine/winternl.h"
#include "winioctl.h"
#include "ntdll_test.h"
#ifndef __WINE_WINTERNL_H

View file

@ -17,18 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "winnls.h"
#include "wine/test.h"
#include "wine/winternl.h"
#include "ntdll_test.h"
#ifndef __WINE_WINTERNL_H

View file

@ -18,13 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include "ntdll_test.h"
#include "windef.h"
#include "winbase.h"
static NTSTATUS (WINAPI *pNtResumeProcess)(HANDLE);
static NTSTATUS (WINAPI *pNtSuspendProcess)(HANDLE);
static NTSTATUS (WINAPI *pNtSuspendThread)(HANDLE,PULONG);

View file

@ -23,11 +23,8 @@
*/
#include "ntdll_test.h"
#include "wine/winternl.h"
#include "stdio.h"
#include "winnt.h"
#include "winnls.h"
#include "stdlib.h"
#include <winreg.h>
/* A test string */
static const WCHAR stringW[] = {'s', 't', 'r', 'i', 'n', 'g', 'W', 0};

View file

@ -21,14 +21,14 @@
* windows.
*/
#include <stdlib.h>
#include "ntdll_test.h"
#include "inaddr.h"
#include "in6addr.h"
#include "initguid.h"
#include <inaddr.h>
#include <in6addr.h>
#include <objbase.h>
#include <initguid.h>
#define COBJMACROS
#include "shobjidl.h"
#include <shobjidl.h>
#ifndef __WINE_WINTERNL_H

View file

@ -22,13 +22,9 @@
* windows.
*/
#include <stdlib.h>
#define INITGUID
#include "ntdll_test.h"
#include "winnls.h"
#include "guiddef.h"
#include <initguid.h>
#define HASH_STRING_ALGORITHM_X65599 1
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff

View file

@ -21,11 +21,8 @@
* windows.
*/
#include <stdlib.h>
#include "ntdll_test.h"
/* Function ptrs for ntdll calls */
static HMODULE hntdll = 0;
static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN);

View file

@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include "ntdll_test.h"
/* FIXME: Inspect */
@ -203,7 +202,7 @@ static void test_NtGetTickCount(void)
for (i = 0; i < 5; ++i)
{
diff = (user_shared_data->u.TickCountQuad * user_shared_data->TickCountMultiplier) >> 24;
diff = (user_shared_data->TickCountQuad * user_shared_data->TickCountMultiplier) >> 24;
diff = pNtGetTickCount() - diff;
ok(diff < 32, "NtGetTickCount - TickCountQuad too high, expected < 32 got %d\n", diff);
Sleep(50);