https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ffd9617271deb9cf782d7…
commit ffd9617271deb9cf782d78192a2d963dea585119
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Thu Dec 21 13:53:36 2017 +0100
[DSOUND_WINETEST] Add a PCH.
---
modules/rostests/winetests/dsound/CMakeLists.txt | 5 +++--
modules/rostests/winetests/dsound/capture.c | 16 +--------------
modules/rostests/winetests/dsound/ds3d.c | 15 --------------
modules/rostests/winetests/dsound/ds3d8.c | 14 -------------
modules/rostests/winetests/dsound/dsound.c | 15 --------------
modules/rostests/winetests/dsound/dsound8.c | 25 +++---------------------
modules/rostests/winetests/dsound/dsound_test.h | 18 +++++++++++++++++
modules/rostests/winetests/dsound/duplex.c | 14 -------------
modules/rostests/winetests/dsound/propset.c | 16 ++-------------
9 files changed, 27 insertions(+), 111 deletions(-)
diff --git a/modules/rostests/winetests/dsound/CMakeLists.txt
b/modules/rostests/winetests/dsound/CMakeLists.txt
index 7c51bef761..2edf6f2376 100644
--- a/modules/rostests/winetests/dsound/CMakeLists.txt
+++ b/modules/rostests/winetests/dsound/CMakeLists.txt
@@ -7,10 +7,11 @@ list(APPEND SOURCE
dsound.c
duplex.c
propset.c
- testlist.c)
+ dsound_test.h)
-add_executable(dsound_winetest ${SOURCE})
+add_executable(dsound_winetest ${SOURCE} testlist.c)
target_link_libraries(dsound_winetest uuid dxguid)
set_module_type(dsound_winetest win32cui)
add_importlibs(dsound_winetest ole32 user32 msvcrt kernel32)
+add_pch(dsound_winetest dsound_test.h SOURCE)
add_rostests_file(TARGET dsound_winetest)
diff --git a/modules/rostests/winetests/dsound/capture.c
b/modules/rostests/winetests/dsound/capture.c
index 752da7ab67..141778a415 100644
--- a/modules/rostests/winetests/dsound/capture.c
+++ b/modules/rostests/winetests/dsound/capture.c
@@ -19,23 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#define COBJMACROS
-
-#include <wine/test.h>
+#include "dsound_test.h"
#include <stdio.h>
-//#include "initguid.h"
-//#include "windows.h"
-#include <wingdi.h>
-#include <mmsystem.h>
-#include <dsound.h>
-#include <mmreg.h>
-#include <dsconf.h>
-
-#include "dsound_test.h"
#define NOTIFICATIONS 5
diff --git a/modules/rostests/winetests/dsound/ds3d.c
b/modules/rostests/winetests/dsound/ds3d.c
index f9c4f8dab5..f315de5a89 100644
--- a/modules/rostests/winetests/dsound/ds3d.c
+++ b/modules/rostests/winetests/dsound/ds3d.c
@@ -23,21 +23,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include <wine/test.h>
-
-//#include <windows.h>
-
-#include <math.h>
-#include <wingdi.h>
-#include <mmsystem.h>
-#include <dsound.h>
-#include <mmreg.h>
-#include "ks.h"
-#include "ksmedia.h"
#include "dsound_test.h"
#define PI 3.14159265358979323846
diff --git a/modules/rostests/winetests/dsound/ds3d8.c
b/modules/rostests/winetests/dsound/ds3d8.c
index f18b362e07..521fffc38d 100644
--- a/modules/rostests/winetests/dsound/ds3d8.c
+++ b/modules/rostests/winetests/dsound/ds3d8.c
@@ -23,20 +23,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-//#include <windows.h>
-
-#include <math.h>
-
-#include <wine/test.h>
-#include <wingdi.h>
-#include <mmreg.h>
-#include <dsound.h>
-#include <ks.h>
-#include <ksmedia.h>
#include "dsound_test.h"
static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL;
diff --git a/modules/rostests/winetests/dsound/dsound.c
b/modules/rostests/winetests/dsound/dsound.c
index 12f865a6cf..8a097012f1 100644
--- a/modules/rostests/winetests/dsound/dsound.c
+++ b/modules/rostests/winetests/dsound/dsound.c
@@ -26,21 +26,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-//#include <windows.h>
-
-#include <wine/test.h>
-#include <wingdi.h>
-#include <mmreg.h>
-#include <dsound.h>
-#include <dsconf.h>
-//#include "initguid.h"
-#include <ks.h>
-#include <ksmedia.h>
-
#include "dsound_test.h"
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
diff --git a/modules/rostests/winetests/dsound/dsound8.c
b/modules/rostests/winetests/dsound/dsound8.c
index fd88441aac..8f473bd0f1 100644
--- a/modules/rostests/winetests/dsound/dsound8.c
+++ b/modules/rostests/winetests/dsound/dsound8.c
@@ -25,29 +25,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define NONAMELESSUNION
-//#include <windows.h>
-//#include <stdio.h>
-
-#include <wine/test.h>
-#include <wingdi.h>
-#include <mmreg.h>
-#include <dsound.h>
-#include <dsconf.h>
-#include <ks.h>
-#include <ksmedia.h>
+#include "dsound_test.h"
+
#include <initguid.h>
#include <mmdeviceapi.h>
-//#include "audioclient.h"
-//#include "propkey.h"
-//#include "devpkey.h"
-
-#include "dsound_test.h"
static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL;
static HRESULT (WINAPI *pDirectSoundCreate8)(LPCGUID,LPDIRECTSOUND8*,LPUNKNOWN)=NULL;
@@ -1112,7 +1093,7 @@ static void test_first_device(void)
hr = IPropertyStore_GetValue(ps, &PKEY_AudioEndpoint_GUID, &pv);
ok(hr == S_OK, "GetValue failed: %08x\n", hr);
- CLSIDFromString(pv.u.pwszVal, &default_info.guid);
+ CLSIDFromString(pv.pwszVal, &default_info.guid);
PropVariantClear(&pv);
IPropertyStore_Release(ps);
diff --git a/modules/rostests/winetests/dsound/dsound_test.h
b/modules/rostests/winetests/dsound/dsound_test.h
index 97aca5bd51..d7cca491ad 100644
--- a/modules/rostests/winetests/dsound/dsound_test.h
+++ b/modules/rostests/winetests/dsound/dsound_test.h
@@ -18,9 +18,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#ifndef _DSOUND_TEST_H_
+#define _DSOUND_TEST_H_
+
+#include <math.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#define COBJMACROS
+
+#include <wine/test.h>
+
#include <wingdi.h>
#include <mmreg.h>
#include <mmsystem.h>
+#include <dsound.h>
+#include <dsconf.h>
+#include <ks.h>
+#include <ksmedia.h>
static const unsigned int formats[][4]={
{ 8000, 8, 1, 0 },
@@ -93,3 +109,5 @@ extern void test_buffer8(LPDIRECTSOUND8,LPDIRECTSOUNDBUFFER*,
extern const char * getDSBCAPS(DWORD xmask);
extern int align(int length, int align);
extern const char * format_string(const WAVEFORMATEX* wfx);
+
+#endif /* !_DSOUND_TEST_H_ */
diff --git a/modules/rostests/winetests/dsound/duplex.c
b/modules/rostests/winetests/dsound/duplex.c
index 8f16bfc5e6..0690d442cb 100644
--- a/modules/rostests/winetests/dsound/duplex.c
+++ b/modules/rostests/winetests/dsound/duplex.c
@@ -18,20 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-//#include <windows.h>
-//#include <stdio.h>
-
-#include <wine/test.h>
-#include <wingdi.h>
-#include <mmreg.h>
-#include <dsound.h>
-#include <dsconf.h>
-
#include "dsound_test.h"
static HRESULT (WINAPI *pDirectSoundFullDuplexCreate)(LPCGUID, LPCGUID,
diff --git a/modules/rostests/winetests/dsound/propset.c
b/modules/rostests/winetests/dsound/propset.c
index df0dfd29a3..c8e49332cb 100644
--- a/modules/rostests/winetests/dsound/propset.c
+++ b/modules/rostests/winetests/dsound/propset.c
@@ -19,28 +19,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-//#include <windows.h>
+#include "dsound_test.h"
-#include <wine/test.h>
-#include <wingdi.h>
#include <winnls.h>
-#include <mmreg.h>
-#include <dsound.h>
-#include <dsconf.h>
-
-#include "dsound_test.h"
#ifndef DSBCAPS_CTRLDEFAULT
#define DSBCAPS_CTRLDEFAULT \
DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLPAN|DSBCAPS_CTRLVOLUME
#endif
-#include "initguid.h"
+#include <initguid.h>
DEFINE_GUID(DSPROPSETID_VoiceManager,
0x62A69BAE,0xDF9D,0x11D1,0x99,0xA6,0x00,0xC0,0x4F,0xC9,0x9D,0x46);