[PATCH v2] uianimation/tests: Add initial tests

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Wed Oct 23 19:27:08 CDT 2019


Added win_skip for WinXP failure.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 configure                            |  1 +
 configure.ac                         |  1 +
 dlls/uianimation/tests/Makefile.in   |  5 +++
 dlls/uianimation/tests/uianimation.c | 62 ++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+)
 create mode 100644 dlls/uianimation/tests/Makefile.in
 create mode 100644 dlls/uianimation/tests/uianimation.c

diff --git a/configure b/configure
index f44d4d5b6f..f395fe6ef4 100755
--- a/configure
+++ b/configure
@@ -20860,6 +20860,7 @@ wine_fn_config_makefile dlls/tzres enable_tzres
 wine_fn_config_makefile dlls/ucrtbase enable_ucrtbase
 wine_fn_config_makefile dlls/ucrtbase/tests enable_tests
 wine_fn_config_makefile dlls/uianimation enable_uianimation
+wine_fn_config_makefile dlls/uianimation/tests enable_tests
 wine_fn_config_makefile dlls/uiautomationcore enable_uiautomationcore
 wine_fn_config_makefile dlls/uiautomationcore/tests enable_tests
 wine_fn_config_makefile dlls/uiribbon enable_uiribbon
diff --git a/configure.ac b/configure.ac
index b9339b90aa..31aac11d31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3713,6 +3713,7 @@ WINE_CONFIG_MAKEFILE(dlls/tzres)
 WINE_CONFIG_MAKEFILE(dlls/ucrtbase)
 WINE_CONFIG_MAKEFILE(dlls/ucrtbase/tests)
 WINE_CONFIG_MAKEFILE(dlls/uianimation)
+WINE_CONFIG_MAKEFILE(dlls/uianimation/tests)
 WINE_CONFIG_MAKEFILE(dlls/uiautomationcore)
 WINE_CONFIG_MAKEFILE(dlls/uiautomationcore/tests)
 WINE_CONFIG_MAKEFILE(dlls/uiribbon)
diff --git a/dlls/uianimation/tests/Makefile.in b/dlls/uianimation/tests/Makefile.in
new file mode 100644
index 0000000000..ec1118c2fc
--- /dev/null
+++ b/dlls/uianimation/tests/Makefile.in
@@ -0,0 +1,5 @@
+TESTDLL = uianimation.dll
+IMPORTS = ole32
+
+C_SRCS = \
+	uianimation.c
diff --git a/dlls/uianimation/tests/uianimation.c b/dlls/uianimation/tests/uianimation.c
new file mode 100644
index 0000000000..0cb2fbf2b8
--- /dev/null
+++ b/dlls/uianimation/tests/uianimation.c
@@ -0,0 +1,62 @@
+/*
+ * UI Animation tests
+ *
+ * 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 "windows.h"
+#include "initguid.h"
+#include "uianimation.h"
+
+#include "wine/test.h"
+
+static void test_UIAnimationManager(void)
+{
+    HRESULT hr;
+    IUIAnimationManager *manager;
+    IUIAnimationVariable *variable;
+
+    hr = CoCreateInstance( &CLSID_UIAnimationManager, NULL, CLSCTX_ALL, &IID_IUIAnimationManager, (LPVOID*)&manager);
+    if(FAILED(hr))
+    {
+        win_skip("UIAnimationManager not found\n");
+        return;
+    }
+
+    hr = IUIAnimationManager_CreateAnimationVariable(manager, 1.0f, &variable);
+    todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+    if (hr == S_OK)
+        IUIAnimationVariable_Release(variable);
+
+    IUIAnimationManager_Release(manager);
+}
+
+START_TEST(uianimation)
+{
+    HRESULT hr;
+
+    hr = CoInitialize(0);
+    ok(hr == S_OK, "failed to init com\n");
+    if(hr != S_OK)
+        return;
+
+    test_UIAnimationManager();
+
+    CoUninitialize();
+}
-- 
2.17.1




More information about the wine-devel mailing list