From 342eec7f7de223ebb1d350bab4c6900d7bea3bc2 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Tue, 24 Jun 2014 22:25:30 +0200 Subject: [PATCH] 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 d09b5f650ba..114b4c1b842 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 331b86413f1..618a541245d 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")) -- 2.11.4.GIT