[PATCH 5/5] d3dcompiler/tests: Add a couple more checks for parent data values.
Matteo Bruni
mbruni at codeweavers.com
Tue Jun 24 15:25:30 CDT 2014
---
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"))
--
1.8.5.5
More information about the wine-patches
mailing list