Commit 4c4dedb9 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput/tests: Split joystick tests into separate sources.

parent d22746fe
......@@ -11,7 +11,9 @@ SOURCES = \
dinput8.c \
driver_hid.c \
driver_hid.spec \
force_feedback.c \
hid.c \
joystick.c \
joystick8.c \
keyboard.c \
mouse.c
/*
* DInput driver-based testing framework
*
* Copyright 2015 Sebastian Lackner
* Copyright 2015 Michael Müller
* Copyright 2015 Christian Costa
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_DINPUT_TEST_H
#define __WINE_DINPUT_TEST_H
#include <stdarg.h>
#include <stddef.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winioctl.h"
#include "winternl.h"
#include "dinput.h"
#include "ddk/wdm.h"
#include "ddk/hidsdi.h"
#include "ddk/hidport.h"
#include "wine/test.h"
#include "driver_hid.h"
#define EXPECT_VIDPID MAKELONG( 0x1209, 0x0001 )
extern const WCHAR expect_vidpid_str[];
extern const GUID expect_guid_product;
extern const WCHAR expect_path[];
extern const WCHAR expect_path_end[];
extern HINSTANCE instance;
extern BOOL localized; /* object names get translated */
BOOL pnp_driver_start( const WCHAR *resource );
void pnp_driver_stop(void);
void cleanup_registry_keys(void);
#define dinput_driver_start( a, b, c, d, e ) dinput_driver_start_( __FILE__, __LINE__, a, b, c, d, e )
BOOL dinput_driver_start_( const char *file, int line, const BYTE *desc_buf, ULONG desc_len,
const HIDP_CAPS *caps, struct hid_expect *expect, ULONG expect_size );
#define dinput_test_init() dinput_test_init_( __FILE__, __LINE__ )
BOOL dinput_test_init_( const char *file, int line );
void dinput_test_exit(void);
HRESULT dinput_test_create_device( DWORD version, DIDEVICEINSTANCEW *devinst, IDirectInputDevice8W **device );
#define check_member_( file, line, val, exp, fmt, member ) \
ok_(file, line)( (val).member == (exp).member, "got " #member " " fmt "\n", (val).member )
#define check_member( val, exp, fmt, member ) \
check_member_( __FILE__, __LINE__, val, exp, fmt, member )
#define check_member_guid_( file, line, val, exp, member ) \
ok_(file, line)( IsEqualGUID( &(val).member, &(exp).member ), "got " #member " %s\n", \
debugstr_guid( &(val).member ) )
#define check_member_guid( val, exp, member ) \
check_member_guid_( __FILE__, __LINE__, val, exp, member )
#define check_member_wstr_( file, line, val, exp, member ) \
ok_(file, line)( !wcscmp( (val).member, (exp).member ), "got " #member " %s\n", \
debugstr_w((val).member) )
#define check_member_wstr( val, exp, member ) \
check_member_wstr_( __FILE__, __LINE__, val, exp, member )
#define sync_ioctl( a, b, c, d, e, f, g ) sync_ioctl_( __FILE__, __LINE__, a, b, c, d, e, f, g )
BOOL sync_ioctl_( const char *file, int line, HANDLE device, DWORD code, void *in_buf, DWORD in_len,
void *out_buf, DWORD *ret_len, DWORD timeout );
#define set_hid_expect( a, b, c ) set_hid_expect_( __FILE__, __LINE__, a, b, c )
void set_hid_expect_( const char *file, int line, HANDLE device, struct hid_expect *expect, DWORD expect_size );
#define wait_hid_expect( a, b ) wait_hid_expect_( __FILE__, __LINE__, a, b )
void wait_hid_expect_( const char *file, int line, HANDLE device, DWORD timeout );
#define send_hid_input( a, b, c ) send_hid_input_( __FILE__, __LINE__, a, b, c )
void send_hid_input_( const char *file, int line, HANDLE device, struct hid_expect *expect, DWORD expect_size );
#endif /* __WINE_DINPUT_TEST_H */
......@@ -34,6 +34,7 @@
#include "wine/list.h"
#include "initguid.h"
#include "driver_hid.h"
static UNICODE_STRING control_symlink;
......
......@@ -35,8 +35,6 @@
#include "ddk/wdm.h"
#include "initguid.h"
DEFINE_GUID(control_class,0xdeadbeef,0x29ef,0x4538,0xa5,0xfd,0xb6,0x95,0x73,0xa3,0x62,0xc0);
#define IOCTL_WINETEST_HID_SET_EXPECT CTL_CODE(FILE_DEVICE_KEYBOARD, 0x800, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment