On Wed, May 9, 2012 at 11:32 PM, Józef Kucia joseph.kucia@gmail.com wrote:
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index ab56593..3d5a50f 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -917,6 +917,20 @@ static void test_D3DXCreateVolumeTexture(IDirect3DDevice9 *device) } }
+static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device) +{
- HRESULT hr;
- IDirect3DTexture9 *texture;
- hr = D3DXCreateTextureFromFileInMemory(device, dds_16bit, sizeof(dds_16bit), &texture);
- ok(hr == D3D_OK, "D3DCreateTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
- if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
- hr = D3DXCreateTextureFromFileInMemory(device, dds_24bit, sizeof(dds_24bit), &texture);
- ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
- if (SUCCEEDED(hr)) IDirect3DTexture9_Release(texture);
+}
I noticed that I put more and more texture functions tests in tests/surface.c, because these tests needs the dds files which are in tests/surface.c. I wonder if it would be better to copy needed dds files to tests/texture.c and move texture function tests to their proper place. I think the dds files could be used to tests other texture functions, e.g. D3DXCreateTextureFromFileInMemoryEx doesn't seem to have any tests.
2012/5/10 Józef Kucia joseph.kucia@gmail.com:
I noticed that I put more and more texture functions tests in tests/surface.c, because these tests needs the dds files which are in tests/surface.c. I wonder if it would be better to copy needed dds files to tests/texture.c and move texture function tests to their proper place. I think the dds files could be used to tests other texture functions, e.g. D3DXCreateTextureFromFileInMemoryEx doesn't seem to have any tests.
I think that's a good idea, yes.