[SHELL32_APITEST] Improve the existing PCH and make use of it. Convert AddCommas.c to c++ in order to have it benefit from the PCH.

This commit is contained in:
Amine Khaldi 2017-12-17 13:31:22 +01:00
parent 95ec9464d3
commit 8ed8eec17c
14 changed files with 39 additions and 63 deletions

View file

@ -5,14 +5,13 @@
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#include <apitest.h>
#include <windef.h>
#include "shelltest.h"
#include <winnls.h>
#include <bcrypt.h>
#include <ntstatus.h>
#include <strsafe.h>
DECLSPEC_IMPORT LPWSTR WINAPI AddCommasW(DWORD lValue, LPWSTR lpNumber);
extern "C" DECLSPEC_IMPORT LPWSTR WINAPI AddCommasW(DWORD lValue, LPWSTR lpNumber);
START_TEST(AddCommas)
{

View file

@ -6,9 +6,6 @@
*/
#include "shelltest.h"
#include <atlbase.h>
#include <atlcom.h>
#include <strsafe.h>
#define NDEBUG
#include <debug.h>

View file

@ -1,12 +1,12 @@
spec2def(shell32_apitest.exe shell32_apitest.spec)
set_cpp(WITH_RUNTIME)
spec2def(shell32_apitest.exe shell32_apitest.spec)
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl)
add_executable(shell32_apitest
AddCommas.c
list(APPEND SOURCE
AddCommas.cpp
Control_RunDLLW.cpp
CFSFolder.cpp
CMyComputer.cpp
@ -18,10 +18,16 @@ add_executable(shell32_apitest
ShellExecuteEx.cpp
shelltest.cpp
SHParseDisplayName.cpp
shelltest.h)
add_executable(shell32_apitest
${SOURCE}
testlist.c
resource.rc
${CMAKE_CURRENT_BINARY_DIR}/shell32_apitest.def)
target_link_libraries(shell32_apitest wine uuid ${PSEH_LIB})
set_module_type(shell32_apitest win32cui)
add_importlibs(shell32_apitest user32 gdi32 shell32 ole32 oleaut32 advapi32 shlwapi msvcrt kernel32 ntdll)
add_pch(shell32_apitest shelltest.h SOURCE)
add_rostests_file(TARGET shell32_apitest)

View file

@ -6,9 +6,6 @@
*/
#include "shelltest.h"
#include <atlbase.h>
#include <atlcom.h>
#include <strsafe.h>
#define NDEBUG
#include <debug.h>

View file

@ -7,16 +7,10 @@
*/
#include "shelltest.h"
#include <atlbase.h>
#include <atlcom.h>
#include <strsafe.h>
#include <ndk/rtlfuncs.h>
#define NDEBUG
#include <debug.h>
#include <shellutils.h>
// We would normally use S_LESSTHAN and S_GREATERTHAN, but w2k3 returns numbers like 3 and -3...
// So instead we check on the sign bit (compare result is the low word of the hresult).
#define SHORT_SIGN_BIT 0x8000

View file

@ -6,10 +6,6 @@
*/
#include "shelltest.h"
#include <atlbase.h>
#include <atlcom.h>
#include <strsafe.h>
#include <ndk/rtlfuncs.h>
#define NDEBUG
#include <debug.h>

View file

@ -6,7 +6,10 @@
*/
#include "shelltest.h"
#include <cpl.h>
#include <stdio.h>
#define NDEBUG
#include <debug.h>

View file

@ -6,6 +6,7 @@
*/
#include "shelltest.h"
#include <assert.h>
/*

View file

@ -6,13 +6,12 @@
*/
#include "shelltest.h"
#include <atlbase.h>
#include <atlcom.h>
ULONG DbgPrint(PCH Format,...);
#include <shellutils.h>
#include <wincon.h>
#include <wingdi.h>
ULONG DbgPrint(PCH Format,...);
#include <shellutils.h>
HRESULT (STDAPICALLTYPE *pSHCreateFileExtractIconW)(LPCWSTR pszFile, DWORD dwFileAttributes, REFIID riid, void **ppv);

View file

@ -6,9 +6,6 @@
*/
#include "shelltest.h"
#include "apitest.h"
#include <ndk/umtypes.h>
#include <strsafe.h>
/* Version masks */
#define T_ALL 0x0

View file

@ -5,11 +5,8 @@
* PROGRAMMER: Yaroslav Veremenko <yaroslav@veremenko.info>
*/
#include "shelltest.h"
#define ok_ShellExecuteEx (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : TestShellExecuteEx
static

View file

@ -7,6 +7,13 @@
#include "shelltest.h"
#include <shlwapi.h>
#include <unknownbase.h>
#include <shlguid_undoc.h>
#define test_S_OK(hres, message) ok(hres == S_OK, "%s (0x%lx instead of S_OK)\n",message, hResult);
#define test_HRES(hres, hresExpected, message) ok(hres == hresExpected, "%s (0x%lx instead of 0x%lx)\n",message, hResult,hresExpected);
BOOL CheckWindowClass(HWND hwnd, PCWSTR className)
{
ULONG size = (wcslen(className) + 1)* sizeof(WCHAR);

View file

@ -1,7 +1,4 @@
#include "shelltest.h"
#include <atlbase.h>
#include <atlcom.h>
// + Adapted from https://blogs.msdn.microsoft.com/oldnewthing/20130503-00/?p=4463/
// In short: We want to create an IDLIST from an item that does not exist,

View file

@ -1,32 +1,18 @@
#define WIN32_NO_STATUS
#ifndef _SHELLTEST_H_
#define _SHELLTEST_H_
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <stdio.h>
#include <wine/test.h>
#include <winuser.h>
#include <ntstatus.h>
#define WIN32_NO_STATUS
#include <apitest.h>
#include <winreg.h>
#include <commctrl.h>
#include <shellapi.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <string.h>
#include <tchar.h>
#include <initguid.h>
#define test_S_OK(hres, message) ok(hres == S_OK, "%s (0x%lx instead of S_OK)\n",message, hResult);
#define test_HRES(hres, hresExpected, message) ok(hres == hresExpected, "%s (0x%lx instead of 0x%lx)\n",message, hResult,hresExpected);
DEFINE_GUID(CLSID_MenuBandSite, 0xE13EF4E4, 0xD2F2, 0x11D0, 0x98, 0x16, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72);
#include "unknownbase.h"
#include <shellapi.h>
#include <atlbase.h>
#include <atlcom.h>
VOID PathToIDList(LPCWSTR pszPath, ITEMIDLIST** ppidl);
#endif /* !_SHELLTEST_H_ */