[SHELL32_WINETEST] Add a PCH.

This commit is contained in:
Amine Khaldi 2017-12-20 13:29:32 +01:00
parent de6d0f24bc
commit e32018ba19
23 changed files with 73 additions and 235 deletions

View 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)

View file

@ -17,12 +17,7 @@
* 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

View file

@ -17,16 +17,9 @@
* 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)
{

View file

@ -18,16 +18,7 @@
* 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;

View file

@ -19,15 +19,8 @@
* 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 */

View file

@ -18,18 +18,10 @@
* 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.

View file

@ -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

View 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

View file

@ -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_ */

View file

@ -26,13 +26,7 @@
* 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

View file

@ -18,12 +18,7 @@
* 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);

View file

@ -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

View file

@ -18,16 +18,10 @@
* 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)

View file

@ -19,20 +19,7 @@
*
*/
#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 */

View file

@ -16,16 +16,9 @@
* 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);

View file

@ -21,20 +21,9 @@
* namespace) path for a given folder (CSIDL value).
*/
#define COBJMACROS
#include "precomp.h"
#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 <initguid.h>
/* CSIDL_MYDOCUMENTS is now the same as CSIDL_PERSONAL, but what we want
* here is its original value.

View file

@ -19,19 +19,7 @@
* 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);

View file

@ -30,24 +30,7 @@
* 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;

View file

@ -18,19 +18,7 @@
* 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

View file

@ -18,26 +18,7 @@
* 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);

View file

@ -18,27 +18,7 @@
* 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"

View file

@ -18,18 +18,7 @@
* 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 *);

View file

@ -16,13 +16,8 @@
* 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);