Paul Vriens : uxtheme/tests: Only test the needed functions once, bail out if one is missing.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jun 22 06:16:51 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 6dc86da5732837f7eb7df004e849d30b4d3d8579
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=6dc86da5732837f7eb7df004e849d30b4d3d8579

Author: Paul Vriens <Paul.Vriens at xs4all.nl>
Date:   Wed Jun 21 20:37:10 2006 +0200

uxtheme/tests: Only test the needed functions once, bail out if one is missing.

---

 dlls/uxtheme/tests/system.c |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index dc60105..1072498 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -58,6 +58,15 @@ static BOOL InitFunctionPtrs(void)
       UXTHEME_GET_PROC(OpenThemeData)
       UXTHEME_GET_PROC(SetWindowTheme)
     }
+    /* The following functions should be available, if not return FALSE. The Vista functions will
+     * be checked (at some point in time) within the single tests if needed. All used functions for
+     * now are present on WinXP, W2K3 and Wine.
+     */
+    if (!pCloseThemeData || !pGetWindowTheme ||
+        !pIsAppThemed || !pIsThemeActive ||
+        !pOpenThemeData || !pSetWindowTheme)
+        return FALSE;
+
     return TRUE;
 }
 
@@ -268,28 +277,23 @@ START_TEST(system)
 
     /* IsThemeActive and IsAppThemed */
     trace("Starting test_IsThemed()\n");
-    if (pIsAppThemed && pIsThemeActive)
-        test_IsThemed();
+    test_IsThemed();
 
     /* GetWindowTheme */
     trace("Starting test_GetWindowTheme()\n");
-    if (pGetWindowTheme)
-        test_GetWindowTheme();
+    test_GetWindowTheme();
 
     /* SetWindowTheme */
     trace("Starting test_SetWindowTheme()\n");
-    if (pSetWindowTheme)
-        test_SetWindowTheme();
+    test_SetWindowTheme();
 
     /* OpenThemeData */
     trace("Starting test_OpenThemeData()\n");
-    if (pOpenThemeData && pIsThemeActive) 
-        test_OpenThemeData();
+    test_OpenThemeData();
 
     /* CloseThemeData */
     trace("Starting test_CloseThemeData()\n");
-    if (pCloseThemeData)
-        test_CloseThemeData();
+    test_CloseThemeData();
 
     FreeLibrary(hUxtheme);
 }




More information about the wine-cvs mailing list