Rico Schüller : d3dcompiler/tests: Add D3DStripShader( ) test.

Alexandre Julliard julliard at winehq.org
Fri Oct 15 10:40:26 CDT 2010


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

Author: Rico Schüller <kgbricola at web.de>
Date:   Thu Oct 14 21:04:01 2010 +0200

d3dcompiler/tests: Add D3DStripShader() test.

---

 dlls/d3dcompiler_43/tests/blob.c |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/dlls/d3dcompiler_43/tests/blob.c b/dlls/d3dcompiler_43/tests/blob.c
index a0a8d84..2b6886e 100644
--- a/dlls/d3dcompiler_43/tests/blob.c
+++ b/dlls/d3dcompiler_43/tests/blob.c
@@ -319,6 +319,34 @@ static void test_get_blob_part(void)
 
     refcount = ID3D10Blob_Release(blob);
     ok(!refcount, "ID3DBlob has %u references left\n", refcount);
+
+    /* check corner cases for D3DStripShader */
+    hr = D3DStripShader(test_blob_part, test_blob_part[6], 0xffffffff, &blob);
+    ok(hr == S_OK, "D3DStripShader failed, got %x, expected %x\n", hr, S_OK);
+
+    refcount = ID3D10Blob_Release(blob);
+    ok(!refcount, "ID3DBlob has %u references left\n", refcount);
+
+    hr = D3DStripShader(test_blob_part, test_blob_part[6], 0, &blob);
+    ok(hr == S_OK, "D3DStripShader failed, got %x, expected %x\n", hr, S_OK);
+
+    refcount = ID3D10Blob_Release(blob);
+    ok(!refcount, "ID3DBlob has %u references left\n", refcount);
+
+    hr = D3DStripShader(NULL, test_blob_part[6], 0, &blob);
+    ok(hr == D3DERR_INVALIDCALL, "D3DStripShader failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL);
+
+    hr = D3DStripShader(test_blob_part, 2, 0, &blob);
+    ok(hr == D3DERR_INVALIDCALL, "D3DStripShader failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL);
+
+    hr = D3DStripShader(test_blob_part, test_blob_part[6], 0, NULL);
+    ok(hr == E_FAIL, "D3DStripShader failed, got %x, expected %x\n", hr, E_FAIL);
+
+    hr = D3DStripShader(NULL, test_blob_part[6], 0, NULL);
+    ok(hr == E_FAIL, "D3DStripShader failed, got %x, expected %x\n", hr, E_FAIL);
+
+    hr = D3DStripShader(test_blob_part, 0, 0, NULL);
+    ok(hr == E_FAIL, "D3DStripShader failed, got %x, expected %x\n", hr, E_FAIL);
 }
 
 /*




More information about the wine-cvs mailing list