[NTDLL_WINETEST] Add a PCH.
authorAmine Khaldi <amine.khaldi@reactos.org>
Wed, 20 Dec 2017 12:07:06 +0000 (13:07 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Wed, 20 Dec 2017 12:07:06 +0000 (13:07 +0100)
21 files changed:
modules/rostests/winetests/ntdll/CMakeLists.txt
modules/rostests/winetests/ntdll/atom.c
modules/rostests/winetests/ntdll/change.c
modules/rostests/winetests/ntdll/directory.c
modules/rostests/winetests/ntdll/env.c
modules/rostests/winetests/ntdll/error.c
modules/rostests/winetests/ntdll/exception.c
modules/rostests/winetests/ntdll/file.c
modules/rostests/winetests/ntdll/generated.c
modules/rostests/winetests/ntdll/info.c
modules/rostests/winetests/ntdll/large_int.c
modules/rostests/winetests/ntdll/ntdll_test.h
modules/rostests/winetests/ntdll/om.c
modules/rostests/winetests/ntdll/pipe.c
modules/rostests/winetests/ntdll/port.c
modules/rostests/winetests/ntdll/process.c
modules/rostests/winetests/ntdll/reg.c
modules/rostests/winetests/ntdll/rtl.c
modules/rostests/winetests/ntdll/rtlstr.c
modules/rostests/winetests/ntdll/string.c
modules/rostests/winetests/ntdll/time.c

index 0bbc8d3..2e9a5ef 100644 (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)
index 6a16a8d..e8ad049 100755 (executable)
  * 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;
index fc9a181..8dfc68d 100644 (file)
  * 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,
index 21f22ad..75f371c 100644 (file)
  * 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 );
index 8989760..5d024ec 100755 (executable)
@@ -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,
index 8a7732b..5f725e6 100755 (executable)
  * 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
index 8dc2d90..1fb7786 100644 (file)
  * 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;
 
index 3316399..36ca9fc 100644 (file)
  * 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 {
index b099a5c..54b43a3 100755 (executable)
@@ -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
  */
index d03d26c..f42619a 100755 (executable)
@@ -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);
index 4562e67..2313f9e 100755 (executable)
  * windows.
  */
 
-#include <stdlib.h>
-
 #include "ntdll_test.h"
 
-
 /* Function ptrs for ntdll calls */
 static HMODULE hntdll = 0;
 static LONGLONG (WINAPI *pRtlExtendedMagicDivide)(LONGLONG, LONGLONG, INT);
index 84ed6a4..d192e33 100755 (executable)
  * 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/test.h>
+#include <winuser.h>
+#include <winnls.h>
+#include <winioctl.h>
+#include <wine/winternl.h>
 
-#include "wine/winternl.h"
-#include "wine/test.h"
+#endif /* !_NTDLL_TEST_H_ */
index 651db0a..49784e5 100644 (file)
  */
 
 #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);
index a3984e1..48cfad0 100644 (file)
  * 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
 
index e5bb3ed..1b47718 100644 (file)
  * 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
 
index 41303b7..8187f63 100644 (file)
  * 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);
index 67833b1..1f3bd0a 100755 (executable)
  */
 
 #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};
index 5ba6b11..147fd2d 100755 (executable)
  * 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
 
index 7f889df..c113f76 100755 (executable)
  * 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
index 9bbaddd..9de0039 100755 (executable)
  * 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);
index dc570e1..7d9e651 100755 (executable)
@@ -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);