From d73ae487c3e4ff04646fb5c84011f09a6260a9aa Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Thu, 15 Oct 2009 22:36:05 +0200 Subject: d3d8/tests: test for {IDirect3DTexture8,IDirect3DSurface8}::UnlockRect for rectangles that are not locked --- dlls/d3d8/tests/surface.c | 2 ++ dlls/d3d8/tests/visual.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/d3d8/tests/surface.c b/dlls/d3d8/tests/surface.c index 4980a41..9451919 100644 --- a/dlls/d3d8/tests/surface.c +++ b/dlls/d3d8/tests/surface.c @@ -252,6 +252,8 @@ static void test_lockrect_invalid(IDirect3DDevice8 *device) valid[1].right, valid[1].bottom, D3DERR_INVALIDCALL); hr = IDirect3DSurface8_UnlockRect(surface); ok(SUCCEEDED(hr), "UnlockRect failed (0x%08x)\n", hr); + hr = IDirect3DSurface8_UnlockRect(surface); + ok(hr == D3DERR_INVALIDCALL, "Double UnlockRect returned 0x%08x, expected D3DERR_INVALIDCALL\n", hr); IDirect3DSurface8_Release(surface); } diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 07b8810..be274fb 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -1213,7 +1213,9 @@ static void texop_test(IDirect3DDevice8 *device) ok(SUCCEEDED(hr), "LockRect failed with 0x%08x\n", hr); *((DWORD *)locked_rect.pBits) = D3DCOLOR_ARGB(0x99, 0x00, 0xff, 0x00); hr = IDirect3DTexture8_UnlockRect(texture, 0); - ok(SUCCEEDED(hr), "LockRect failed with 0x%08x\n", hr); + ok(SUCCEEDED(hr), "UnLockRect failed with 0x%08x\n", hr); + hr = IDirect3DTexture8_UnlockRect(texture, 0); + todo_wine ok(SUCCEEDED(hr), "Double UnLockRect failed with 0x%08x\n", hr); hr = IDirect3DDevice8_SetTexture(device, 0, (IDirect3DBaseTexture8 *)texture); ok(SUCCEEDED(hr), "SetTexture failed with 0x%08x\n", hr); -- 1.6.0.4