Commit 8bffed50 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Added dinput tests.

parent e6d4bcd7
......@@ -1550,6 +1550,7 @@ dlls/ddraw/Makefile
dlls/ddraw/tests/Makefile
dlls/devenum/Makefile
dlls/dinput/Makefile
dlls/dinput/tests/Makefile
dlls/dinput8/Makefile
dlls/dmband/Makefile
dlls/dmcompos/Makefile
......
......@@ -21,6 +21,8 @@ IMPLIB_SRCS = data_formats.c
RC_SRCS = version.rc
SUBDIRS = tests
@MAKE_DLL_RULES@
### Dependencies:
Makefile
joystick.ok
keyboard.ok
mouse.ok
testlist.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = dinput.dll
IMPORTS = dinput ole32 version user32 kernel32
EXTRALIBS = -ldxguid -luuid -ldxerr8
CTESTS = \
joystick.c \
keyboard.c \
mouse.c
@MAKE_TEST_RULES@
### Dependencies:
/*
* Copyright (c) 2005 Robert Reif
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
extern HWND get_hwnd();
extern const char * get_file_version(const char * file_name);
/*
* Copyright (c) 2005 Robert Reif
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define STRICT
#define DIRECTINPUT_VERSION 0x0700
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include <windows.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "wine/test.h"
#include "windef.h"
#include "wingdi.h"
#include "dinput.h"
#include "dxerr8.h"
#include "dinput_test.h"
const char * get_file_version(const char * file_name)
{
static char version[32];
DWORD size;
DWORD handle;
size = GetFileVersionInfoSizeA(file_name, &handle);
if (size) {
char * data = HeapAlloc(GetProcessHeap(), 0, size);
if (data) {
if (GetFileVersionInfoA(file_name, handle, size, data)) {
VS_FIXEDFILEINFO *pFixedVersionInfo;
UINT len;
if (VerQueryValueA(data, "\\", (LPVOID *)&pFixedVersionInfo, &len)) {
sprintf(version, "%ld.%ld.%ld.%ld",
pFixedVersionInfo->dwFileVersionMS >> 16,
pFixedVersionInfo->dwFileVersionMS & 0xffff,
pFixedVersionInfo->dwFileVersionLS >> 16,
pFixedVersionInfo->dwFileVersionLS & 0xffff);
} else
sprintf(version, "not available");
} else
sprintf(version, "failed");
HeapFree(GetProcessHeap(), 0, data);
} else
sprintf(version, "failed");
} else
sprintf(version, "not available");
return version;
}
static void keyboard_tests()
{
}
START_TEST(keyboard)
{
CoInitialize(NULL);
trace("DLL Version: %s\n", get_file_version("dinput.dll"));
keyboard_tests();
CoUninitialize();
}
/*
* Copyright (c) 2005 Robert Reif
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define STRICT
#define DIRECTINPUT_VERSION 0x0700
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include <windows.h>
#include <math.h>
#include <stdlib.h>
#include "wine/test.h"
#include "windef.h"
#include "wingdi.h"
#include "dinput.h"
#include "dxerr8.h"
#include "dinput_test.h"
static void mouse_tests()
{
}
START_TEST(mouse)
{
CoInitialize(NULL);
trace("DLL Version: %s\n", get_file_version("dinput.dll"));
mouse_tests();
CoUninitialize();
}
......@@ -23,6 +23,7 @@ TESTBINS = \
advapi32_test.exe$(DLLEXT) \
comctl32_test.exe$(DLLEXT) \
ddraw_test.exe$(DLLEXT) \
dinput_test.exe$(DLLEXT) \
dsound_test.exe$(DLLEXT) \
gdi32_test.exe$(DLLEXT) \
iphlpapi_test.exe$(DLLEXT) \
......@@ -95,6 +96,8 @@ comctl32_test.exe$(DLLEXT): $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT)
cp $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT) $@ && $(STRIP) $@
ddraw_test.exe$(DLLEXT): $(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT)
cp $(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT) $@ && $(STRIP) $@
dinput_test.exe$(DLLEXT): $(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT)
cp $(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT) $@ && $(STRIP) $@
dsound_test.exe$(DLLEXT): $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT)
cp $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT) $@ && $(STRIP) $@
gdi32_test.exe$(DLLEXT): $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT)
......
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