mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[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:
parent
95ec9464d3
commit
8ed8eec17c
|
@ -5,14 +5,13 @@
|
||||||
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
|
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <apitest.h>
|
#include "shelltest.h"
|
||||||
#include <windef.h>
|
|
||||||
#include <winnls.h>
|
#include <winnls.h>
|
||||||
#include <bcrypt.h>
|
#include <bcrypt.h>
|
||||||
#include <ntstatus.h>
|
|
||||||
#include <strsafe.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)
|
START_TEST(AddCommas)
|
||||||
{
|
{
|
|
@ -6,9 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
#include <atlbase.h>
|
|
||||||
#include <atlcom.h>
|
|
||||||
#include <strsafe.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
spec2def(shell32_apitest.exe shell32_apitest.spec)
|
|
||||||
|
|
||||||
set_cpp(WITH_RUNTIME)
|
set_cpp(WITH_RUNTIME)
|
||||||
|
|
||||||
|
spec2def(shell32_apitest.exe shell32_apitest.spec)
|
||||||
|
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl)
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl)
|
||||||
|
|
||||||
add_executable(shell32_apitest
|
list(APPEND SOURCE
|
||||||
AddCommas.c
|
AddCommas.cpp
|
||||||
Control_RunDLLW.cpp
|
Control_RunDLLW.cpp
|
||||||
CFSFolder.cpp
|
CFSFolder.cpp
|
||||||
CMyComputer.cpp
|
CMyComputer.cpp
|
||||||
|
@ -18,10 +18,16 @@ add_executable(shell32_apitest
|
||||||
ShellExecuteEx.cpp
|
ShellExecuteEx.cpp
|
||||||
shelltest.cpp
|
shelltest.cpp
|
||||||
SHParseDisplayName.cpp
|
SHParseDisplayName.cpp
|
||||||
|
shelltest.h)
|
||||||
|
|
||||||
|
add_executable(shell32_apitest
|
||||||
|
${SOURCE}
|
||||||
testlist.c
|
testlist.c
|
||||||
resource.rc
|
resource.rc
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/shell32_apitest.def)
|
${CMAKE_CURRENT_BINARY_DIR}/shell32_apitest.def)
|
||||||
|
|
||||||
target_link_libraries(shell32_apitest wine uuid ${PSEH_LIB})
|
target_link_libraries(shell32_apitest wine uuid ${PSEH_LIB})
|
||||||
set_module_type(shell32_apitest win32cui)
|
set_module_type(shell32_apitest win32cui)
|
||||||
add_importlibs(shell32_apitest user32 gdi32 shell32 ole32 oleaut32 advapi32 shlwapi msvcrt kernel32 ntdll)
|
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)
|
add_rostests_file(TARGET shell32_apitest)
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
#include <atlbase.h>
|
|
||||||
#include <atlcom.h>
|
|
||||||
#include <strsafe.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -7,16 +7,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
#include <atlbase.h>
|
|
||||||
#include <atlcom.h>
|
|
||||||
#include <strsafe.h>
|
|
||||||
#include <ndk/rtlfuncs.h>
|
#include <ndk/rtlfuncs.h>
|
||||||
|
|
||||||
#define NDEBUG
|
|
||||||
#include <debug.h>
|
|
||||||
#include <shellutils.h>
|
#include <shellutils.h>
|
||||||
|
|
||||||
|
|
||||||
// We would normally use S_LESSTHAN and S_GREATERTHAN, but w2k3 returns numbers like 3 and -3...
|
// 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).
|
// So instead we check on the sign bit (compare result is the low word of the hresult).
|
||||||
#define SHORT_SIGN_BIT 0x8000
|
#define SHORT_SIGN_BIT 0x8000
|
||||||
|
|
|
@ -6,10 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
#include <atlbase.h>
|
|
||||||
#include <atlcom.h>
|
|
||||||
#include <strsafe.h>
|
|
||||||
#include <ndk/rtlfuncs.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
|
|
||||||
#include <cpl.h>
|
#include <cpl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -6,13 +6,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
#include <atlbase.h>
|
|
||||||
#include <atlcom.h>
|
|
||||||
ULONG DbgPrint(PCH Format,...);
|
|
||||||
#include <shellutils.h>
|
|
||||||
#include <wincon.h>
|
#include <wincon.h>
|
||||||
#include <wingdi.h>
|
#include <wingdi.h>
|
||||||
|
|
||||||
|
ULONG DbgPrint(PCH Format,...);
|
||||||
|
#include <shellutils.h>
|
||||||
|
|
||||||
HRESULT (STDAPICALLTYPE *pSHCreateFileExtractIconW)(LPCWSTR pszFile, DWORD dwFileAttributes, REFIID riid, void **ppv);
|
HRESULT (STDAPICALLTYPE *pSHCreateFileExtractIconW)(LPCWSTR pszFile, DWORD dwFileAttributes, REFIID riid, void **ppv);
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
#include "apitest.h"
|
|
||||||
#include <ndk/umtypes.h>
|
|
||||||
#include <strsafe.h>
|
|
||||||
|
|
||||||
/* Version masks */
|
/* Version masks */
|
||||||
#define T_ALL 0x0
|
#define T_ALL 0x0
|
||||||
|
|
|
@ -5,11 +5,8 @@
|
||||||
* PROGRAMMER: Yaroslav Veremenko <yaroslav@veremenko.info>
|
* PROGRAMMER: Yaroslav Veremenko <yaroslav@veremenko.info>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ok_ShellExecuteEx (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : TestShellExecuteEx
|
#define ok_ShellExecuteEx (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : TestShellExecuteEx
|
||||||
|
|
||||||
static
|
static
|
||||||
|
|
|
@ -7,6 +7,13 @@
|
||||||
|
|
||||||
#include "shelltest.h"
|
#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)
|
BOOL CheckWindowClass(HWND hwnd, PCWSTR className)
|
||||||
{
|
{
|
||||||
ULONG size = (wcslen(className) + 1)* sizeof(WCHAR);
|
ULONG size = (wcslen(className) + 1)* sizeof(WCHAR);
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
#include "shelltest.h"
|
#include "shelltest.h"
|
||||||
#include <atlbase.h>
|
|
||||||
#include <atlcom.h>
|
|
||||||
|
|
||||||
|
|
||||||
// + Adapted from https://blogs.msdn.microsoft.com/oldnewthing/20130503-00/?p=4463/
|
// + 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,
|
// In short: We want to create an IDLIST from an item that does not exist,
|
||||||
|
|
|
@ -1,32 +1,18 @@
|
||||||
#define WIN32_NO_STATUS
|
#ifndef _SHELLTEST_H_
|
||||||
|
#define _SHELLTEST_H_
|
||||||
|
|
||||||
#define _INC_WINDOWS
|
#define _INC_WINDOWS
|
||||||
#define COM_NO_WINDOWS_H
|
#define COM_NO_WINDOWS_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <ntstatus.h>
|
||||||
#include <wine/test.h>
|
#define WIN32_NO_STATUS
|
||||||
|
#include <apitest.h>
|
||||||
|
|
||||||
#include <winuser.h>
|
|
||||||
#include <winreg.h>
|
#include <winreg.h>
|
||||||
|
|
||||||
#include <commctrl.h>
|
|
||||||
#include <shellapi.h>
|
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <shlwapi.h>
|
#include <shellapi.h>
|
||||||
|
#include <atlbase.h>
|
||||||
#include <stdlib.h>
|
#include <atlcom.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"
|
|
||||||
|
|
||||||
VOID PathToIDList(LPCWSTR pszPath, ITEMIDLIST** ppidl);
|
VOID PathToIDList(LPCWSTR pszPath, ITEMIDLIST** ppidl);
|
||||||
|
|
||||||
|
#endif /* !_SHELLTEST_H_ */
|
||||||
|
|
Loading…
Reference in a new issue