Henri Verbeet : d3d9/tests: Add a test for 0 width / height surface creation.
Alexandre Julliard
julliard at winehq.org
Thu Nov 18 11:09:30 CST 2010
Module: wine
Branch: master
Commit: 4ea2d9f62f03d645876bc9d9a9ee5ed487d7857f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ea2d9f62f03d645876bc9d9a9ee5ed487d7857f
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Nov 18 12:21:40 2010 +0100
d3d9/tests: Add a test for 0 width / height surface creation.
---
dlls/d3d9/tests/surface.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c
index c1246fc..7fcf6e4 100644
--- a/dlls/d3d9/tests/surface.c
+++ b/dlls/d3d9/tests/surface.c
@@ -491,6 +491,20 @@ static void test_getdc(IDirect3DDevice9 *device)
}
}
+static void test_surface_dimensions(IDirect3DDevice9 *device)
+{
+ IDirect3DSurface9 *surface;
+ HRESULT hr;
+
+ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 0, 1, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &surface, NULL);
+ ok(hr == D3DERR_INVALIDCALL, "CreateOffscreenPlainSurface returned %#x, expected D3DERR_INVALIDCALL.\n", hr);
+ if (SUCCEEDED(hr)) IDirect3DSurface9_Release(surface);
+
+ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &surface, NULL);
+ ok(hr == D3DERR_INVALIDCALL, "CreateOffscreenPlainSurface returned %#x, expected D3DERR_INVALIDCALL.\n", hr);
+ if (SUCCEEDED(hr)) IDirect3DSurface9_Release(surface);
+}
+
START_TEST(surface)
{
HMODULE d3d9_handle;
@@ -513,6 +527,7 @@ START_TEST(surface)
test_lockrect_invalid(device_ptr);
test_private_data(device_ptr);
test_getdc(device_ptr);
+ test_surface_dimensions(device_ptr);
refcount = IDirect3DDevice9_Release(device_ptr);
ok(!refcount, "Device has %u references left\n", refcount);
More information about the wine-cvs
mailing list