2020-01-20 01:17:31 -08:00
|
|
|
From efa0cbb8de357cf24f6eb4d15c638dd3c26819ba Mon Sep 17 00:00:00 2001
|
2019-07-28 16:49:00 -07:00
|
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
|
|
Date: Mon, 29 Jul 2019 09:09:41 +1000
|
|
|
|
Subject: [PATCH] directmanipulation/tests: Initial tests
|
|
|
|
|
|
|
|
---
|
|
|
|
configure | 1 +
|
|
|
|
configure.ac | 1 +
|
|
|
|
dlls/directmanipulation/tests/Makefile.in | 5 ++
|
|
|
|
dlls/directmanipulation/tests/manipulation.c | 60 ++++++++++++++++++++
|
|
|
|
4 files changed, 67 insertions(+)
|
|
|
|
create mode 100644 dlls/directmanipulation/tests/Makefile.in
|
|
|
|
create mode 100644 dlls/directmanipulation/tests/manipulation.c
|
|
|
|
|
|
|
|
diff --git a/configure b/configure
|
2020-01-20 01:17:31 -08:00
|
|
|
index 2ae3710ebb0..da201f4ffef 100755
|
2019-07-28 16:49:00 -07:00
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
2020-01-20 01:17:31 -08:00
|
|
|
@@ -20370,6 +20370,7 @@ wine_fn_config_makefile dlls/dinput/tests enable_tests
|
2019-07-28 16:49:00 -07:00
|
|
|
wine_fn_config_makefile dlls/dinput8 enable_dinput8
|
|
|
|
wine_fn_config_makefile dlls/dinput8/tests enable_tests
|
|
|
|
wine_fn_config_makefile dlls/directmanipulation enable_directmanipulation
|
|
|
|
+wine_fn_config_makefile dlls/directmanipulation/tests enable_tests
|
|
|
|
wine_fn_config_makefile dlls/dispdib.dll16 enable_win16
|
|
|
|
wine_fn_config_makefile dlls/dispex enable_dispex
|
|
|
|
wine_fn_config_makefile dlls/dispex/tests enable_tests
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
2020-01-20 01:17:31 -08:00
|
|
|
index 7c0044c8872..b2a913132c2 100644
|
2019-07-28 16:49:00 -07:00
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2020-01-20 01:17:31 -08:00
|
|
|
@@ -3186,6 +3186,7 @@ WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
|
2019-07-28 16:49:00 -07:00
|
|
|
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)
|
|
|
|
WINE_CONFIG_MAKEFILE(dlls/dispex)
|
|
|
|
WINE_CONFIG_MAKEFILE(dlls/dispex/tests)
|
|
|
|
diff --git a/dlls/directmanipulation/tests/Makefile.in b/dlls/directmanipulation/tests/Makefile.in
|
|
|
|
new file mode 100644
|
2020-01-20 01:17:31 -08:00
|
|
|
index 00000000000..29ec0db511a
|
2019-07-28 16:49:00 -07:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/dlls/directmanipulation/tests/Makefile.in
|
|
|
|
@@ -0,0 +1,5 @@
|
|
|
|
+TESTDLL = directmanipulation.dll
|
|
|
|
+IMPORTS = uuid ole32
|
|
|
|
+
|
|
|
|
+C_SRCS = \
|
|
|
|
+ manipulation.c
|
|
|
|
diff --git a/dlls/directmanipulation/tests/manipulation.c b/dlls/directmanipulation/tests/manipulation.c
|
|
|
|
new file mode 100644
|
2020-01-20 01:17:31 -08:00
|
|
|
index 00000000000..93b692729b3
|
2019-07-28 16:49:00 -07:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/dlls/directmanipulation/tests/manipulation.c
|
|
|
|
@@ -0,0 +1,60 @@
|
2020-01-20 01:17:31 -08:00
|
|
|
+/*
|
2019-07-28 16:49:00 -07:00
|
|
|
+ *
|
|
|
|
+ * Copyright 2019 Alistair Leslie-Hughes
|
|
|
|
+ *
|
|
|
|
+ * 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
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+#define COBJMACROS
|
|
|
|
+
|
|
|
|
+#include <stdarg.h>
|
|
|
|
+
|
|
|
|
+#include "windows.h"
|
|
|
|
+#include "directmanipulation.h"
|
|
|
|
+
|
|
|
|
+#include "wine/test.h"
|
|
|
|
+
|
2019-08-18 17:07:18 -07:00
|
|
|
+static void test_IDirectManipulationManager2(void)
|
2019-07-28 16:49:00 -07:00
|
|
|
+{
|
|
|
|
+ IDirectManipulationManager2 *manager2;
|
|
|
|
+ IDirectManipulationUpdateManager *update;
|
|
|
|
+ HRESULT hres;
|
|
|
|
+
|
|
|
|
+ hres = CoCreateInstance(&CLSID_DirectManipulationManager, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
|
|
|
+ &IID_IDirectManipulationManager2, (void**)&manager2);
|
|
|
|
+ if(FAILED(hres))
|
|
|
|
+ {
|
|
|
|
+ win_skip("Failed to create XMLView instance\n");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ ok(hres == S_OK, "CoCreateInstance returned %x, expected S_OK\n", hres);
|
|
|
|
+
|
|
|
|
+ hres = IDirectManipulationManager2_GetUpdateManager(manager2, &IID_IDirectManipulationUpdateManager, (void**)&update);
|
|
|
|
+ ok(hres == S_OK, "returned %x, expected S_OK\n", hres);
|
|
|
|
+
|
|
|
|
+ if(update)
|
|
|
|
+ IDirectManipulationUpdateManager_Release(update);
|
|
|
|
+
|
|
|
|
+ IDirectManipulationManager2_Release(manager2);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+START_TEST(manipulation)
|
|
|
|
+{
|
|
|
|
+ CoInitialize(NULL);
|
|
|
|
+
|
|
|
|
+ test_IDirectManipulationManager2();
|
|
|
|
+
|
|
|
|
+ CoUninitialize();
|
|
|
|
+}
|
|
|
|
--
|
2020-01-20 01:17:31 -08:00
|
|
|
2.24.1
|
2019-07-28 16:49:00 -07:00
|
|
|
|