shell32/tests: Get rid of redundant lok_todo_N macros.

Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Frédéric Delanoy 2016-02-20 14:04:31 +01:00 committed by Alexandre Julliard
parent 61e70dfbc7
commit 9f23eae55f
1 changed files with 23 additions and 25 deletions

View File

@ -351,8 +351,6 @@ static void test_get_set(void)
*/ */
#define lok ok_(__FILE__, line) #define lok ok_(__FILE__, line)
#define lok_todo_4(todo_flag,a,b,c,d) todo_wine_if ((todo & todo_flag) != 0) lok((a), (b), (c), (d));
#define lok_todo_2(todo_flag,a,b) todo_wine_if ((todo & todo_flag) != 0) lok((a), (b));
#define check_lnk(a,b,c) check_lnk_(__LINE__, (a), (b), (c)) #define check_lnk(a,b,c) check_lnk_(__LINE__, (a), (b), (c))
void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails) void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails)
@ -521,44 +519,44 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo)
strcpy(buffer,"garbage"); strcpy(buffer,"garbage");
r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer));
lok(r == S_OK, "GetDescription failed (0x%08x)\n", r); lok(r == S_OK, "GetDescription failed (0x%08x)\n", r);
lok_todo_4(0x1, strcmp(buffer, desc->description)==0, todo_wine_if ((todo & 0x1) != 0)
"GetDescription returned '%s' instead of '%s'\n", lok(strcmp(buffer, desc->description)==0, "GetDescription returned '%s' instead of '%s'\n",
buffer, desc->description); buffer, desc->description);
} }
if (desc->workdir) if (desc->workdir)
{ {
strcpy(buffer,"garbage"); strcpy(buffer,"garbage");
r = IShellLinkA_GetWorkingDirectory(sl, buffer, sizeof(buffer)); r = IShellLinkA_GetWorkingDirectory(sl, buffer, sizeof(buffer));
lok(r == S_OK, "GetWorkingDirectory failed (0x%08x)\n", r); lok(r == S_OK, "GetWorkingDirectory failed (0x%08x)\n", r);
lok_todo_4(0x2, lstrcmpiA(buffer, desc->workdir)==0, todo_wine_if ((todo & 0x2) != 0)
"GetWorkingDirectory returned '%s' instead of '%s'\n", lok(lstrcmpiA(buffer, desc->workdir)==0, "GetWorkingDirectory returned '%s' instead of '%s'\n",
buffer, desc->workdir); buffer, desc->workdir);
} }
if (desc->path) if (desc->path)
{ {
strcpy(buffer,"garbage"); strcpy(buffer,"garbage");
r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH);
lok(SUCCEEDED(r), "GetPath failed (0x%08x)\n", r); lok(SUCCEEDED(r), "GetPath failed (0x%08x)\n", r);
lok_todo_4(0x4, lstrcmpiA(buffer, desc->path)==0, todo_wine_if ((todo & 0x4) != 0)
"GetPath returned '%s' instead of '%s'\n", lok(lstrcmpiA(buffer, desc->path)==0, "GetPath returned '%s' instead of '%s'\n",
buffer, desc->path); buffer, desc->path);
} }
if (desc->pidl) if (desc->pidl)
{ {
LPITEMIDLIST pidl=NULL; LPITEMIDLIST pidl=NULL;
r = IShellLinkA_GetIDList(sl, &pidl); r = IShellLinkA_GetIDList(sl, &pidl);
lok(r == S_OK, "GetIDList failed (0x%08x)\n", r); lok(r == S_OK, "GetIDList failed (0x%08x)\n", r);
lok_todo_2(0x8, pILIsEqual(pidl, desc->pidl), todo_wine_if ((todo & 0x8) != 0)
"GetIDList returned an incorrect pidl\n"); lok(pILIsEqual(pidl, desc->pidl), "GetIDList returned an incorrect pidl\n");
} }
if (desc->showcmd) if (desc->showcmd)
{ {
int i=0xdeadbeef; int i=0xdeadbeef;
r = IShellLinkA_GetShowCmd(sl, &i); r = IShellLinkA_GetShowCmd(sl, &i);
lok(r == S_OK, "GetShowCmd failed (0x%08x)\n", r); lok(r == S_OK, "GetShowCmd failed (0x%08x)\n", r);
lok_todo_4(0x10, i==desc->showcmd, todo_wine_if ((todo & 0x10) != 0)
"GetShowCmd returned 0x%0x instead of 0x%0x\n", lok(i==desc->showcmd, "GetShowCmd returned 0x%0x instead of 0x%0x\n",
i, desc->showcmd); i, desc->showcmd);
} }
if (desc->icon) if (desc->icon)
{ {
@ -566,21 +564,21 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo)
strcpy(buffer,"garbage"); strcpy(buffer,"garbage");
r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i);
lok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); lok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r);
lok_todo_4(0x20, lstrcmpiA(buffer, desc->icon)==0, todo_wine_if ((todo & 0x20) != 0) {
"GetIconLocation returned '%s' instead of '%s'\n", lok(lstrcmpiA(buffer, desc->icon)==0, "GetIconLocation returned '%s' instead of '%s'\n",
buffer, desc->icon); buffer, desc->icon);
lok_todo_4(0x20, i==desc->icon_id, lok(i==desc->icon_id, "GetIconLocation returned 0x%0x instead of 0x%0x\n",
"GetIconLocation returned 0x%0x instead of 0x%0x\n", i, desc->icon_id);
i, desc->icon_id); }
} }
if (desc->hotkey) if (desc->hotkey)
{ {
WORD i=0xbeef; WORD i=0xbeef;
r = IShellLinkA_GetHotkey(sl, &i); r = IShellLinkA_GetHotkey(sl, &i);
lok(r == S_OK, "GetHotkey failed (0x%08x)\n", r); lok(r == S_OK, "GetHotkey failed (0x%08x)\n", r);
lok_todo_4(0x40, i==desc->hotkey, todo_wine_if ((todo & 0x40) != 0)
"GetHotkey returned 0x%04x instead of 0x%04x\n", lok(i==desc->hotkey, "GetHotkey returned 0x%04x instead of 0x%04x\n",
i, desc->hotkey); i, desc->hotkey);
} }
IShellLinkA_Release(sl); IShellLinkA_Release(sl);