[SHELL32_WINETEST] Add a PCH.
authorAmine Khaldi <amine.khaldi@reactos.org>
Wed, 20 Dec 2017 12:29:32 +0000 (13:29 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Wed, 20 Dec 2017 12:29:32 +0000 (13:29 +0100)
23 files changed:
modules/rostests/winetests/shell32/CMakeLists.txt
modules/rostests/winetests/shell32/appbar.c
modules/rostests/winetests/shell32/assoc.c
modules/rostests/winetests/shell32/autocomplete.c
modules/rostests/winetests/shell32/brsfolder.c
modules/rostests/winetests/shell32/ebrowser.c
modules/rostests/winetests/shell32/generated.c
modules/rostests/winetests/shell32/msg.h
modules/rostests/winetests/shell32/precomp.h [new file with mode: 0644]
modules/rostests/winetests/shell32/progman_dde.c
modules/rostests/winetests/shell32/recyclebin.c
modules/rostests/winetests/shell32/shell32_test.h
modules/rostests/winetests/shell32/shelldispatch.c
modules/rostests/winetests/shell32/shelllink.c
modules/rostests/winetests/shell32/shellole.c
modules/rostests/winetests/shell32/shellpath.c
modules/rostests/winetests/shell32/shfldr_special.c
modules/rostests/winetests/shell32/shlexec.c
modules/rostests/winetests/shell32/shlfileop.c
modules/rostests/winetests/shell32/shlfolder.c
modules/rostests/winetests/shell32/shlview.c
modules/rostests/winetests/shell32/string.c
modules/rostests/winetests/shell32/systray.c

index 7d33d85..ded63d7 100644 (file)
@@ -23,10 +23,13 @@ list(APPEND SOURCE
     shlview.c
     string.c
     systray.c
+    precomp.h)
+
+add_executable(shell32_winetest
+    ${SOURCE}
     testlist.c
     rsrc.rc)
 
-add_executable(shell32_winetest ${SOURCE})
 target_link_libraries(shell32_winetest uuid)
 set_module_type(shell32_winetest win32cui)
 add_importlibs(shell32_winetest shell32 ole32 oleaut32 user32 gdi32 advapi32 msvcrt kernel32)
@@ -35,4 +38,5 @@ if(MSVC)
     add_importlibs(shell32_winetest ntdll)
 endif()
 
+add_pch(shell32_winetest precomp.h SOURCE)
 add_rostests_file(TARGET shell32_winetest)
index 1505a40..f25fed9 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#include <windows.h>
-#include "shellapi.h"
-
-#include "wine/test.h"
+#include "precomp.h"
 
 #define MSG_APPBAR WM_APP
 
index 2cd06d2..ac6edef 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-
-#include <stdarg.h>
-
-#include "shlwapi.h"
-#include "shlguid.h"
-#include "shobjidl.h"
-
-#include "wine/test.h"
+#include "precomp.h"
 
+#include <shobjidl.h>
 
 static void test_IQueryAssociations_QueryInterface(void)
 {
index 63a2eb2..c2c02e2 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-
-#include <wine/test.h>
-#include <stdarg.h>
-
-#include "windows.h"
-#include "shobjidl.h"
-#include "shlguid.h"
-#include "initguid.h"
-#include "shldisp.h"
+#include "precomp.h"
 
 static HWND hMainWnd, hEdit;
 static HINSTANCE hinst;
index bf29d11..d564ed5 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
+#include "precomp.h"
 
-#include <windows.h>
-#include <shlobj.h>
-#include <shobjidl.h>
-#include <string.h>
-#include "shellapi.h"
-
-#include "wine/test.h"
 #define IDD_MAKENEWFOLDER 0x3746 /* From "../shresdef.h" */
 #define TIMER_WAIT_MS 50 /* Should be long enough for slow systems */
 
index 7db5842..27beff5 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdio.h>
+#include "precomp.h"
 
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include "shlobj.h"
-#include "shlwapi.h"
-
-#include "wine/test.h"
-
-#include "initguid.h"
-#include "mshtml.h"
+#include <initguid.h>
+#include <mshtml.h>
 
 /**********************************************************************
  * Some IIDs for test_SetSite.
index ace877e..b18fdec 100755 (executable)
@@ -5,22 +5,7 @@
  * Unit tests for data structure packing
  */
 
-#define WINVER 0x0501
-#define _WIN32_IE 0x0501
-#define _WIN32_WINNT 0x0501
-
-#define WINE_NOWINSOCK
-
-#include <stdarg.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wtypes.h"
-#include "shellapi.h"
-#include "winuser.h"
-#include "wingdi.h"
-#include "shlobj.h"
-
-#include "wine/test.h"
+#include "precomp.h"
 
 /***********************************************************************
  * Compatibility macros
index a457fd4..7afdc7a 100644 (file)
@@ -18,9 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-#include <windows.h>
-#include "wine/test.h"
+#pragma once
 
 /* undocumented SWP flags - from SDK 3.1 */
 #define SWP_NOCLIENTSIZE       0x0800
diff --git a/modules/rostests/winetests/shell32/precomp.h b/modules/rostests/winetests/shell32/precomp.h
new file mode 100644 (file)
index 0000000..ffa1f86
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef _SHELL32_WINETEST_PRECOMP_H_
+#define _SHELL32_WINETEST_PRECOMP_H_
+
+#include <assert.h>
+#include <stdio.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <wine/test.h>
+
+#include <winreg.h>
+#include <winnls.h>
+#include <winuser.h>
+#include <wincon.h>
+#include <shellapi.h>
+#include <shlwapi.h>
+#include <shlguid.h>
+#include <shlobj.h>
+#include <ddeml.h>
+#include <commoncontrols.h>
+#include <reactos/undocshell.h>
+
+#include "shell32_test.h"
+
+#endif /* !_SHELL32_WINETEST_PRECOMP_H_ */
index 6e1378f..bb566ba 100644 (file)
  *         Tests for Invalid Characters in Names / Invalid Parameters
  */
 
-#include <stdio.h>
-#include <wine/test.h>
-#include <winbase.h>
-#include "dde.h"
-#include "ddeml.h"
-#include "winuser.h"
-#include "shlobj.h"
+#include "precomp.h"
 
 /* Timeout on DdeClientTransaction Call */
 #define MS_TIMEOUT_VAL 1000
index 50e262e..7cb8f6e 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include "shellapi.h"
-
-#include <stdio.h>
-#include "wine/test.h"
+#include "precomp.h"
 
 static int (WINAPI *pSHQueryRecycleBinA)(LPCSTR,LPSHQUERYRBINFO);
 static int (WINAPI *pSHFileOperationA)(LPSHFILEOPSTRUCTA);
index 42a74fb..906dcac 100755 (executable)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#pragma once
 
 /* Helper function for creating .lnk files */
 typedef struct
index 04f664c..30b3133 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
+#include "precomp.h"
 
-#include "shldisp.h"
-#include "shlobj.h"
-#include "shlwapi.h"
-#include "wine/test.h"
-
-#include "initguid.h"
+#include <winsvc.h>
+#include <initguid.h>
 
 #define EXPECT_HR(hr,hr_exp) \
     ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
index 050c033..5e995db 100755 (executable)
  *
  */
 
-#define COBJMACROS
-
-#include "initguid.h"
-#include "windows.h"
-#include "shlguid.h"
-#include "shobjidl.h"
-#include "shlobj.h"
-#include "shellapi.h"
-#include "commoncontrols.h"
-#include "wine/test.h"
-
-#include "shell32_test.h"
-
-#include <reactos/undocshell.h>
+#include "precomp.h"
 
 #ifndef SLDF_HAS_LOGO3ID
 #  define SLDF_HAS_LOGO3ID 0x00000800 /* not available in the Vista SDK */
index eedbdf6..f248592 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define CONST_VTABLE
-#define NONAMELESSUNION
+#include "precomp.h"
 
-#include <stdio.h>
-#include <wine/test.h>
-
-#include "winbase.h"
-#include "shlobj.h"
-#include "initguid.h"
+#include <initguid.h>
 
 DEFINE_GUID(FMTID_Test,0x12345678,0x1234,0x1234,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12);
 DEFINE_GUID(FMTID_NotExisting, 0x12345678,0x1234,0x1234,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x13);
@@ -116,10 +109,10 @@ static HRESULT WINAPI PropertyStorage_ReadMultiple(IPropertyStorage *This, ULONG
         ok(rgpropvar != NULL, "rgpropvar = NULL\n");
 
         ok(rgpspec[0].ulKind == PRSPEC_PROPID, "rgpspec[0].ulKind = %d\n", rgpspec[0].ulKind);
-        ok(rgpspec[0].u.propid == PID_CODEPAGE, "rgpspec[0].propid = %d\n", rgpspec[0].u.propid);
+        ok(rgpspec[0].propid == PID_CODEPAGE, "rgpspec[0].propid = %d\n", rgpspec[0].propid);
 
         rgpropvar[0].vt = VT_I2;
-        rgpropvar[0].u.iVal = 1234;
+        rgpropvar[0].iVal = 1234;
     } else {
         CHECK_EXPECT(ReadMultiple);
 
@@ -130,13 +123,13 @@ static HRESULT WINAPI PropertyStorage_ReadMultiple(IPropertyStorage *This, ULONG
         ok(rgpropvar[0].vt==0 || broken(rgpropvar[0].vt==VT_BSTR), "rgpropvar[0].vt = %d\n", rgpropvar[0].vt);
 
         rgpropvar[0].vt = VT_BSTR;
-        rgpropvar[0].u.bstrVal = (void*)0xdeadbeef;
+        rgpropvar[0].bstrVal = (void*)0xdeadbeef;
         rgpropvar[1].vt = VT_LPSTR;
-        rgpropvar[1].u.pszVal = (void*)0xdeadbeef;
+        rgpropvar[1].pszVal = (void*)0xdeadbeef;
         rgpropvar[2].vt = VT_BYREF|VT_I1;
-        rgpropvar[2].u.pcVal = (void*)0xdeadbeef;
+        rgpropvar[2].pcVal = (void*)0xdeadbeef;
         rgpropvar[3].vt = VT_BYREF|VT_VARIANT;
-        rgpropvar[3].u.pvarVal = (void*)0xdeadbeef;
+        rgpropvar[3].pvarVal = (void*)0xdeadbeef;
     }
 
     return S_OK;
@@ -419,7 +412,7 @@ static void test_SHPropStg_functions(void)
     CHECK_CALLED(WriteMultiple);
 
     read[0].vt = VT_BSTR;
-    read[0].u.bstrVal = (void*)0xdeadbeef;
+    read[0].bstrVal = (void*)0xdeadbeef;
     SET_EXPECT(ReadMultiple);
     SET_EXPECT(ReadMultipleCodePage);
     SET_EXPECT(Stat);
index 9fea876..02eecb9 100644 (file)
  * namespace) path for a given folder (CSIDL value).
  */
 
-#define COBJMACROS
-
-#include <stdarg.h>
-#include <stdio.h>
-#include "windef.h"
-#include "winbase.h"
-#include "shlguid.h"
-#include "shlobj.h"
-#include "shlwapi.h"
-#include "knownfolders.h"
-#include "shellapi.h"
-#include "wine/test.h"
-
-#include "initguid.h"
+#include "precomp.h"
+
+#include <initguid.h>
 
 /* CSIDL_MYDOCUMENTS is now the same as CSIDL_PERSONAL, but what we want
  * here is its original value.
index dd4cc04..08efed9 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <stdio.h>
-
-#define COBJMACROS
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include "shellapi.h"
-#include "shlobj.h"
-
-#include "wine/test.h"
+#include "precomp.h"
 
 static inline BOOL SHELL_OsIsUnicode(void)
 {
@@ -164,10 +152,10 @@ if (0)
     hr = IShellFolder2_GetDefaultColumnState(folder, 6, &state);
     ok(broken(hr == E_NOTIMPL) || hr == E_INVALIDARG /* Win7 */, "got 0x%08x\n", hr);
 
-    details.str.u.pOleStr = NULL;
+    details.str.pOleStr = NULL;
     hr = IShellFolder2_GetDetailsOf(folder, NULL, 0, &details);
     ok(hr == S_OK || broken(hr == E_NOTIMPL) /* W2K */, "got 0x%08x\n", hr);
-    if (SHELL_OsIsUnicode()) SHFree(details.str.u.pOleStr);
+    if (SHELL_OsIsUnicode()) SHFree(details.str.pOleStr);
 
     /* test every column if method is implemented */
     if (hr == S_OK)
@@ -183,7 +171,7 @@ if (0)
             ok(details.fmt == LVCFMT_LEFT, "got 0x%x\n", details.fmt);
             /* can't be on w9x at this point, IShellFolder2 unsupported there,
                check present for running Wine with w9x setup */
-            if (SHELL_OsIsUnicode()) SHFree(details.str.u.pOleStr);
+            if (SHELL_OsIsUnicode()) SHFree(details.str.pOleStr);
 
             hr = IShellFolder2_GetDefaultColumnState(folder, i, &state);
             ok(hr == S_OK, "got 0x%08x\n", hr);
index f0f51f5..34f76e3 100755 (executable)
  *   we could check
  */
 
-/* Needed to get SEE_MASK_NOZONECHECKS with the PSDK */
-#define NTDDI_WINXPSP1 0x05010100
-#define NTDDI_VERSION NTDDI_WINXPSP1
-#define _WIN32_WINNT 0x0501
-
-#include <stdio.h>
-#include <assert.h>
-
-#include "wtypes.h"
-#include "winbase.h"
-#include "windef.h"
-#include "shellapi.h"
-#include "shlwapi.h"
-#include "ddeml.h"
-#include "wine/test.h"
-
-#include "shell32_test.h"
-
+#include "precomp.h"
 
 static char argv0[MAX_PATH];
 static int myARGC;
index 0f44082..4e89858 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <stdio.h>
-
-#define COBJMACROS
-#define WINE_NOWINSOCK
-#include <windows.h>
-#include "shellapi.h"
-#include "shlobj.h"
-#include "commoncontrols.h"
-
-#include "wine/test.h"
-
-#include <reactos/undocshell.h>
+#include "precomp.h"
 
 #ifndef FOF_NORECURSION
 #define FOF_NORECURSION 0x1000
index 1e03978..8d2481f 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <stdio.h>
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include "windef.h"
-#include "winbase.h"
-#include "wtypes.h"
-#include "shellapi.h"
-
-
-#include "shlguid.h"
-#include "shlobj.h"
-#include "shobjidl.h"
-#include "shlwapi.h"
-#include "ocidl.h"
-#include "oleauto.h"
-
-#include "wine/test.h"
+#include "precomp.h"
 
 #include <initguid.h>
 DEFINE_GUID(IID_IParentAndItem, 0xB3A4B685, 0xB685, 0x4805, 0x99,0xD9, 0x5D,0xEA,0xD2,0x87,0x32,0x36);
index 7685506..5b08473 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <stdio.h>
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include "windef.h"
-#include "winbase.h"
-#include "wtypes.h"
-#include "shellapi.h"
-
-#include "shlguid.h"
-#include "shlobj.h"
-#include "shobjidl.h"
-#include "shlwapi.h"
-#include "ocidl.h"
-#include "oleauto.h"
-
-#include "initguid.h"
-
-#include "wine/test.h"
+#include "precomp.h"
 
 #include "msg.h"
 
index 6cdb386..4d70962 100755 (executable)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <stdio.h>
-
-#define WINE_NOWINSOCK
-#include "windef.h"
-#include "winbase.h"
-#include "wtypes.h"
-#include "shellapi.h"
-#include "shtypes.h"
-#include "objbase.h"
-
-#include "wine/test.h"
+#include "precomp.h"
 
 static HMODULE hShell32;
 static BOOL (WINAPI *pStrRetToStrNAW)(LPVOID,DWORD,LPSTRRET,const ITEMIDLIST *);
index 4af10f0..5473868 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-#define _WIN32_IE 0x600
-#include <stdarg.h>
-
-#include <windows.h>
-
-#include "wine/test.h"
 
+#include "precomp.h"
 
 static HWND hMainWnd;
 static BOOL (WINAPI *pShell_NotifyIconW)(DWORD,PNOTIFYICONDATAW);