Matteo Bruni : d3dcompiler/tests: Add a couple more checks for parent data values.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 25 13:42:03 CDT 2014


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

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Tue Jun 24 22:25:30 2014 +0200

d3dcompiler/tests: Add a couple more checks for parent data values.

---

 dlls/d3dcompiler_43/compiler.c  | 5 +++--
 dlls/d3dcompiler_43/tests/asm.c | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c
index d09b5f6..114b4c1 100644
--- a/dlls/d3dcompiler_43/compiler.c
+++ b/dlls/d3dcompiler_43/compiler.c
@@ -145,11 +145,12 @@ static void wpp_warning(const char *file, int line, int col, const char *near,
 static char *wpp_lookup_mem(const char *filename, int type, const char *parent_name,
                             char **include_path, int include_path_count)
 {
-    /* Here we return always ok. We will maybe fail on the next wpp_open_mem */
+    /* We don't check for file existence here. We will potentially fail on
+     * the following wpp_open_mem(). */
     char *path;
     int i;
 
-    TRACE("Looking for include %s.\n", debugstr_a(filename));
+    TRACE("Looking for include %s, parent %s.\n", debugstr_a(filename), debugstr_a(parent_name));
 
     parent_include = NULL;
     if (strcmp(parent_name, initial_filename))
diff --git a/dlls/d3dcompiler_43/tests/asm.c b/dlls/d3dcompiler_43/tests/asm.c
index 331b864..618a541 100644
--- a/dlls/d3dcompiler_43/tests/asm.c
+++ b/dlls/d3dcompiler_43/tests/asm.c
@@ -1446,12 +1446,14 @@ static HRESULT WINAPI testD3DInclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE i
         buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(include));
         CopyMemory(buffer, include, sizeof(include));
         *bytes = sizeof(include);
+        ok(!parent_data, "Wrong parent_data value.\n");
     }
     else if (!strcmp(filename, "incl2.vsh"))
     {
         buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(include2));
         CopyMemory(buffer, include2, sizeof(include2));
         *bytes = sizeof(include2);
+        ok(!parent_data, "Wrong parent_data value.\n");
         ok(include_type == D3D_INCLUDE_LOCAL, "Wrong include type %d.\n", include_type);
     }
     else if (!strcmp(filename, "incl3.vsh"))




More information about the wine-cvs mailing list