Paul Vriens : d3d8/tests: Fix a test failure on VMware and VirtualBox.

Alexandre Julliard julliard at winehq.org
Mon Jan 5 10:24:33 CST 2009


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

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Mon Jan  5 12:46:05 2009 +0100

d3d8/tests: Fix a test failure on VMware and VirtualBox.

---

 dlls/d3d8/tests/stateblock.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d8/tests/stateblock.c b/dlls/d3d8/tests/stateblock.c
index fbb8248..a6ad662 100644
--- a/dlls/d3d8/tests/stateblock.c
+++ b/dlls/d3d8/tests/stateblock.c
@@ -61,7 +61,8 @@ static HRESULT init_d3d8(HMODULE d3d8_module, IDirect3DDevice8 **device, D3DPRES
 
     hr = IDirect3D8_CreateDevice(d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window,
             D3DCREATE_SOFTWARE_VERTEXPROCESSING, device_pparams, device);
-    ok(SUCCEEDED(hr) || hr == D3DERR_NOTAVAILABLE, "IDirect3D8_CreateDevice failed, hr %#x.\n", hr);
+    ok(SUCCEEDED(hr) || hr == D3DERR_NOTAVAILABLE || broken(hr == D3DERR_INVALIDCALL),
+            "IDirect3D8_CreateDevice failed, hr %#x.\n", hr);
 
     return hr;
 }
@@ -1540,7 +1541,11 @@ START_TEST(stateblock)
     }
 
     hr = init_d3d8(d3d8_module, &device, &device_pparams);
-    if (FAILED(hr)) return;
+    if (FAILED(hr))
+    {
+        FreeLibrary(d3d8_module);
+        return;
+    }
 
     test_begin_end_state_block(device);
     test_state_management(device, &device_pparams);
@@ -1548,4 +1553,6 @@ START_TEST(stateblock)
 
     refcount = IDirect3DDevice8_Release(device);
     ok(!refcount, "Device has %u references left\n", refcount);
+
+    FreeLibrary(d3d8_module);
 }




More information about the wine-cvs mailing list