Francois Gouget : d3d8/tests: Warn that tests were skipped if we could not load d3d8.dll.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jan 12 05:39:08 CST 2007


Module: wine
Branch: master
Commit: a76e6b11b0ea3ee736a3e3b6f0d92e05b27487d8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a76e6b11b0ea3ee736a3e3b6f0d92e05b27487d8

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Jan 11 15:38:11 2007 +0100

d3d8/tests: Warn that tests were skipped if we could not load d3d8.dll.

But report a failed test if a mandatory function is missing from it.

---

 dlls/d3d8/tests/d3d8_main.c |    4 ++++
 dlls/d3d8/tests/device.c    |    6 ++++++
 dlls/d3d8/tests/surface.c   |    2 +-
 dlls/d3d8/tests/texture.c   |    2 +-
 dlls/d3d8/tests/volume.c    |    2 +-
 5 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d8/tests/d3d8_main.c b/dlls/d3d8/tests/d3d8_main.c
index a001f31..aee7625 100644
--- a/dlls/d3d8/tests/d3d8_main.c
+++ b/dlls/d3d8/tests/d3d8_main.c
@@ -107,7 +107,11 @@ START_TEST(d3d8_main)
 {
     HMODULE d3d8_handle = LoadLibraryA( "d3d8.dll" );
     if (!d3d8_handle)
+    {
+        skip("Could not load d3d8.dll\n");
         return;
+    }
+
     ValidateVertexShader = (void*)GetProcAddress (d3d8_handle, "ValidateVertexShader" );
     ValidatePixelShader = (void*)GetProcAddress (d3d8_handle, "ValidatePixelShader" );
     test_ValidateVertexShader();
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index b9ed2c5..8ec237e 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -763,8 +763,14 @@ static void test_display_modes(void)
 START_TEST(device)
 {
     HMODULE d3d8_handle = LoadLibraryA( "d3d8.dll" );
+    if (!d3d8_handle)
+    {
+        skip("Could not load d3d8.dll\n");
+        return;
+    }
 
     pDirect3DCreate8 = (void *)GetProcAddress( d3d8_handle, "Direct3DCreate8" );
+    ok(pDirect3DCreate8 != NULL, "Failed to get address of Direct3DCreate8\n");
     if (pDirect3DCreate8)
     {
         test_display_modes();
diff --git a/dlls/d3d8/tests/surface.c b/dlls/d3d8/tests/surface.c
index 393223c..21f9dfe 100644
--- a/dlls/d3d8/tests/surface.c
+++ b/dlls/d3d8/tests/surface.c
@@ -129,7 +129,7 @@ START_TEST(surface)
     d3d8_handle = LoadLibraryA("d3d8.dll");
     if (!d3d8_handle)
     {
-        trace("Could not load d3d8.dll, skipping tests\n");
+        skip("Could not load d3d8.dll\n");
         return;
     }
 
diff --git a/dlls/d3d8/tests/texture.c b/dlls/d3d8/tests/texture.c
index 500b3c8..3e0b805 100644
--- a/dlls/d3d8/tests/texture.c
+++ b/dlls/d3d8/tests/texture.c
@@ -110,7 +110,7 @@ START_TEST(texture)
     d3d8_handle = LoadLibraryA("d3d8.dll");
     if (!d3d8_handle)
     {
-        trace("Could not load d3d8.dll, skipping tests\n");
+        skip("Could not load d3d8.dll\n");
         return;
     }
 
diff --git a/dlls/d3d8/tests/volume.c b/dlls/d3d8/tests/volume.c
index be4e771..5d339c3 100644
--- a/dlls/d3d8/tests/volume.c
+++ b/dlls/d3d8/tests/volume.c
@@ -129,7 +129,7 @@ START_TEST(volume)
     d3d8_handle = LoadLibraryA("d3d8.dll");
     if (!d3d8_handle)
     {
-        trace("Could not load d3d8.dll, skipping tests\n");
+        skip("Could not load d3d8.dll\n");
         return;
     }
 




More information about the wine-cvs mailing list