d3d9/tests: Warn that tests were skipped if we could not load
d3d9.dll.
Francois Gouget
fgouget at codeweavers.com
Thu Jan 11 08:38:47 CST 2007
But report a failed test if a mandatory function is missing from it.
Also warn if the hardware capabilities force us to skip some tests.
---
Note: This depends on the patch that adds the skip() function.
dlls/d3d9/tests/device.c | 6 ++++++
dlls/d3d9/tests/shader.c | 6 +++---
dlls/d3d9/tests/stateblock.c | 2 +-
dlls/d3d9/tests/surface.c | 2 +-
dlls/d3d9/tests/texture.c | 2 +-
dlls/d3d9/tests/vertexdeclaration.c | 6 +++---
dlls/d3d9/tests/volume.c | 2 +-
7 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 44bfd0b..2b28aff 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -947,8 +947,14 @@ static void test_display_modes(void)
START_TEST(device)
{
HMODULE d3d9_handle = LoadLibraryA( "d3d9.dll" );
+ if (!d3d9_handle)
+ {
+ skip("Could not load d3d9.dll\n");
+ return;
+ }
pDirect3DCreate9 = (void *)GetProcAddress( d3d9_handle, "Direct3DCreate9" );
+ ok(pDirect3DCreate9 != NULL, "Failed to get address of Direct3DCreate9\n");
if (pDirect3DCreate9)
{
test_display_modes();
diff --git a/dlls/d3d9/tests/shader.c b/dlls/d3d9/tests/shader.c
index 2273673..f15ad77 100644
--- a/dlls/d3d9/tests/shader.c
+++ b/dlls/d3d9/tests/shader.c
@@ -154,7 +154,7 @@ START_TEST(shader)
d3d9_handle = LoadLibraryA("d3d9.dll");
if (!d3d9_handle)
{
- trace("Could not load d3d9.dll, skipping tests\n");
+ skip("Could not load d3d9.dll\n");
return;
}
@@ -167,11 +167,11 @@ START_TEST(shader)
{
test_get_set_vertex_shader(device_ptr);
}
- else trace("No vertex shader support, skipping test\n");
+ else skip("No vertex shader support\n");
if (caps.PixelShaderVersion & 0xffff)
{
test_get_set_pixel_shader(device_ptr);
}
- else trace("No pixel shader support, skipping test\n");
+ else skip("No pixel shader support\n");
}
diff --git a/dlls/d3d9/tests/stateblock.c b/dlls/d3d9/tests/stateblock.c
index bfed524..fd25e01 100644
--- a/dlls/d3d9/tests/stateblock.c
+++ b/dlls/d3d9/tests/stateblock.c
@@ -1459,7 +1459,7 @@ START_TEST(stateblock)
d3d9_handle = LoadLibraryA("d3d9.dll");
if (!d3d9_handle)
{
- trace("Could not load d3d9.dll, skipping tests\n");
+ skip("Could not load d3d9.dll\n");
return;
}
diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c
index c76a358..06a5716 100644
--- a/dlls/d3d9/tests/surface.c
+++ b/dlls/d3d9/tests/surface.c
@@ -180,7 +180,7 @@ START_TEST(surface)
d3d9_handle = LoadLibraryA("d3d9.dll");
if (!d3d9_handle)
{
- trace("Could not load d3d9.dll, skipping tests\n");
+ skip("Could not load d3d9.dll\n");
return;
}
diff --git a/dlls/d3d9/tests/texture.c b/dlls/d3d9/tests/texture.c
index cc48206..d34ac4b 100644
--- a/dlls/d3d9/tests/texture.c
+++ b/dlls/d3d9/tests/texture.c
@@ -109,7 +109,7 @@ START_TEST(texture)
d3d9_handle = LoadLibraryA("d3d9.dll");
if (!d3d9_handle)
{
- trace("Could not load d3d9.dll, skipping tests\n");
+ skip("Could not load d3d9.dll\n");
return;
}
diff --git a/dlls/d3d9/tests/vertexdeclaration.c b/dlls/d3d9/tests/vertexdeclaration.c
index eafd0a4..7598e93 100644
--- a/dlls/d3d9/tests/vertexdeclaration.c
+++ b/dlls/d3d9/tests/vertexdeclaration.c
@@ -632,21 +632,21 @@ START_TEST(vertexdeclaration)
d3d9_handle = LoadLibraryA("d3d9.dll");
if (!d3d9_handle)
{
- trace("Could not load d3d9.dll, skipping tests\n");
+ skip("Could not load d3d9.dll\n");
return;
}
device_ptr = init_d3d9();
if (!device_ptr)
{
- trace("Failed to initialise d3d9, aborting test.\n");
+ skip("Failed to initialise d3d9\n");
return;
}
decl_ptr = test_create_vertex_declaration(device_ptr, simple_decl);
if (!decl_ptr)
{
- trace("Failed to create a vertex declaration, aborting test.\n");
+ skip("Failed to create a vertex declaration\n");
return;
}
diff --git a/dlls/d3d9/tests/volume.c b/dlls/d3d9/tests/volume.c
index 61f3ee1..e1ad947 100644
--- a/dlls/d3d9/tests/volume.c
+++ b/dlls/d3d9/tests/volume.c
@@ -126,7 +126,7 @@ START_TEST(volume)
d3d9_handle = LoadLibraryA("d3d9.dll");
if (!d3d9_handle)
{
- trace("Could not load d3d9.dll, skipping tests\n");
+ skip("Could not load d3d9.dll\n");
return;
}
--
1.4.4.2
More information about the wine-patches
mailing list