Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
v2: More changes to the tests but this should avoid spurious failures caused by test output overflow.
It's also probably something I think we should ultimately do, as there's little reason to keep these tests separated.
configure.ac | 1 - dlls/dinput/tests/Makefile.in | 12 ++++++++++-- .../tests/device.c => dinput/tests/device8.c} | 2 +- dlls/dinput/tests/dinput.c | 4 +++- .../tests/dinput.c => dinput/tests/dinput8.c} | 5 ++--- dlls/{dinput8 => dinput}/tests/driver_hid.c | 0 dlls/{dinput8 => dinput}/tests/driver_hid.h | 0 dlls/{dinput8 => dinput}/tests/driver_hid.spec | 0 dlls/{dinput8 => dinput}/tests/hid.c | 0 dlls/{dinput8 => dinput}/tests/pop_hid_macros.h | 0 dlls/{dinput8 => dinput}/tests/psh_hid_macros.h | 0 dlls/dinput8/tests/Makefile.in | 12 ------------ 12 files changed, 16 insertions(+), 20 deletions(-) rename dlls/{dinput8/tests/device.c => dinput/tests/device8.c} (99%) rename dlls/{dinput8/tests/dinput.c => dinput/tests/dinput8.c} (99%) rename dlls/{dinput8 => dinput}/tests/driver_hid.c (100%) rename dlls/{dinput8 => dinput}/tests/driver_hid.h (100%) rename dlls/{dinput8 => dinput}/tests/driver_hid.spec (100%) rename dlls/{dinput8 => dinput}/tests/hid.c (100%) rename dlls/{dinput8 => dinput}/tests/pop_hid_macros.h (100%) rename dlls/{dinput8 => dinput}/tests/psh_hid_macros.h (100%) delete mode 100644 dlls/dinput8/tests/Makefile.in
diff --git a/configure.ac b/configure.ac index 9b2c111119f..ddd45b8c241 100644 --- a/configure.ac +++ b/configure.ac @@ -2743,7 +2743,6 @@ WINE_CONFIG_MAKEFILE(dlls/difxapi) WINE_CONFIG_MAKEFILE(dlls/dinput) WINE_CONFIG_MAKEFILE(dlls/dinput/tests) WINE_CONFIG_MAKEFILE(dlls/dinput8) -WINE_CONFIG_MAKEFILE(dlls/dinput8/tests) WINE_CONFIG_MAKEFILE(dlls/directmanipulation) WINE_CONFIG_MAKEFILE(dlls/directmanipulation/tests) WINE_CONFIG_MAKEFILE(dlls/dispdib.dll16,enable_win16) diff --git a/dlls/dinput/tests/Makefile.in b/dlls/dinput/tests/Makefile.in index 858c2cdae7a..87a4dad2708 100644 --- a/dlls/dinput/tests/Makefile.in +++ b/dlls/dinput/tests/Makefile.in @@ -1,9 +1,17 @@ TESTDLL = dinput.dll -IMPORTS = dinput ole32 version user32 +IMPORTS = dinput dinput8 ole32 version user32 advapi32 hid uuid crypt32 newdev setupapi wintrust winmm
-C_SRCS = \ +driver_hid_IMPORTS = winecrt0 ntoskrnl hal hidclass +driver_hid_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native + +SOURCES = \ device.c \ + device8.c \ dinput.c \ + dinput8.c \ + driver_hid.c \ + driver_hid.spec \ + hid.c \ joystick.c \ keyboard.c \ mouse.c diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput/tests/device8.c similarity index 99% rename from dlls/dinput8/tests/device.c rename to dlls/dinput/tests/device8.c index 8b34de276db..817e843e33c 100644 --- a/dlls/dinput8/tests/device.c +++ b/dlls/dinput/tests/device8.c @@ -1836,7 +1836,7 @@ static void test_keyboard_info(void) ok( ref == 0, "Release returned %d\n", ref ); }
-START_TEST(device) +START_TEST(device8) { instance = GetModuleHandleW( NULL );
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c index c7fa0b76397..10da888fdd4 100644 --- a/dlls/dinput/tests/dinput.c +++ b/dlls/dinput/tests/dinput.c @@ -19,8 +19,10 @@ #define DIRECTINPUT_VERSION 0x0700
#define COBJMACROS -#include <initguid.h> #include <windows.h> +#include "objbase.h" + +#include <initguid.h> #include <dinput.h> #include <dinputd.h>
diff --git a/dlls/dinput8/tests/dinput.c b/dlls/dinput/tests/dinput8.c similarity index 99% rename from dlls/dinput8/tests/dinput.c rename to dlls/dinput/tests/dinput8.c index 3e2e4fbb371..81aeb8191f6 100644 --- a/dlls/dinput8/tests/dinput.c +++ b/dlls/dinput/tests/dinput8.c @@ -22,13 +22,12 @@ #include <windows.h> #include <objidl.h>
-#include <initguid.h> #include <dinput.h> #include <dinputd.h>
#include "wine/test.h"
-HINSTANCE hInstance; +static HINSTANCE hInstance;
static BOOL CALLBACK dummy_callback(const DIDEVICEINSTANCEA *instance, void *context) { @@ -711,7 +710,7 @@ static void test_Initialize(void) IDirectInput8_Release(pDI); }
-START_TEST(dinput) +START_TEST(dinput8) { hInstance = GetModuleHandleA(NULL);
diff --git a/dlls/dinput8/tests/driver_hid.c b/dlls/dinput/tests/driver_hid.c similarity index 100% rename from dlls/dinput8/tests/driver_hid.c rename to dlls/dinput/tests/driver_hid.c diff --git a/dlls/dinput8/tests/driver_hid.h b/dlls/dinput/tests/driver_hid.h similarity index 100% rename from dlls/dinput8/tests/driver_hid.h rename to dlls/dinput/tests/driver_hid.h diff --git a/dlls/dinput8/tests/driver_hid.spec b/dlls/dinput/tests/driver_hid.spec similarity index 100% rename from dlls/dinput8/tests/driver_hid.spec rename to dlls/dinput/tests/driver_hid.spec diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput/tests/hid.c similarity index 100% rename from dlls/dinput8/tests/hid.c rename to dlls/dinput/tests/hid.c diff --git a/dlls/dinput8/tests/pop_hid_macros.h b/dlls/dinput/tests/pop_hid_macros.h similarity index 100% rename from dlls/dinput8/tests/pop_hid_macros.h rename to dlls/dinput/tests/pop_hid_macros.h diff --git a/dlls/dinput8/tests/psh_hid_macros.h b/dlls/dinput/tests/psh_hid_macros.h similarity index 100% rename from dlls/dinput8/tests/psh_hid_macros.h rename to dlls/dinput/tests/psh_hid_macros.h diff --git a/dlls/dinput8/tests/Makefile.in b/dlls/dinput8/tests/Makefile.in deleted file mode 100644 index 336dbd500ba..00000000000 --- a/dlls/dinput8/tests/Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ -TESTDLL = dinput8.dll -IMPORTS = dinput8 dinput ole32 user32 hid advapi32 uuid crypt32 newdev setupapi wintrust winmm - -driver_hid_IMPORTS = winecrt0 ntoskrnl hal hidclass -driver_hid_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native - -SOURCES = \ - device.c \ - dinput.c \ - driver_hid.c \ - driver_hid.spec \ - hid.c