Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/shell32/tests/shlfolder.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 95ebb92e5c..c976c85bc8 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -1959,7 +1959,7 @@ static void test_LocalizedNames(void) hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER, &strret); ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr);
- hr = StrRetToBufW(&strret, newPIDL, tempbufW, sizeof(tempbufW)/sizeof(WCHAR)); + hr = StrRetToBufW(&strret, newPIDL, tempbufW, ARRAY_SIZE(tempbufW)); ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); todo_wine ok (!lstrcmpiW(tempbufW, folderdisplayW), "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW)); @@ -1968,7 +1968,7 @@ static void test_LocalizedNames(void) hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER|SHGDN_FOREDITING, &strret); ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr);
- hr = StrRetToBufW(&strret, newPIDL, tempbufW, sizeof(tempbufW)/sizeof(WCHAR)); + hr = StrRetToBufW(&strret, newPIDL, tempbufW, ARRAY_SIZE(tempbufW)); ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); todo_wine ok (!lstrcmpiW(tempbufW, folderdisplayW), "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW)); @@ -1977,7 +1977,7 @@ static void test_LocalizedNames(void) hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER|SHGDN_FORPARSING, &strret); ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr);
- hr = StrRetToBufW(&strret, newPIDL, tempbufW, sizeof(tempbufW)/sizeof(WCHAR)); + hr = StrRetToBufW(&strret, newPIDL, tempbufW, ARRAY_SIZE(tempbufW)); ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); ok (!lstrcmpiW(tempbufW, foldernameW), "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW));
@@ -4943,7 +4943,8 @@ static void test_SHChangeNotify(BOOL test_new_delivery) SHCNE_ALLEVENTS, WM_USER_NOTIFY, 1, entries); ok(notifyID != 0, "Failed to register a window for change notifications\n");
- for(i = 0; i < sizeof(chnotify_tests) / sizeof(*chnotify_tests); ++i){ + for (i = 0; i < ARRAY_SIZE(chnotify_tests); ++i) + { exp_data = chnotify_tests + i;
exp_data->missing_events = exp_data->notify_count; @@ -5135,7 +5136,7 @@ static void test_GetDefaultColumn(void)
CoInitialize(NULL);
- for (i = 0; i < sizeof(folders)/sizeof(folders[0]); i++) + for (i = 0; i < ARRAY_SIZE(folders); i++) { IShellFolder2 *folder; ULONG sort, display; @@ -5186,7 +5187,7 @@ static void test_GetDefaultSearchGUID(void)
CoInitialize(NULL);
- for (i = 0; i < sizeof(folders)/sizeof(folders[0]); i++) + for (i = 0; i < ARRAY_SIZE(folders); i++) { IShellFolder2 *folder; GUID guid;
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at https://testbot.winehq.org/JobDetails.pl?Key=37250
Your paranoid android.
=== w2003std (32 bit shlfolder) === shlfolder.c:4955: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 8) shlfolder.c:4955: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 2) shlfolder.c:4955: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 10) shlfolder.c:4955: Test failed: MKDIR: Expected wndproc to be called shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 6ac) shlfolder.c:4955: Test failed: CREATE: Expected wndproc to be called shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 6ac) shlfolder.c:4955: Test failed: RMDIR: Expected wndproc to be called shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 6ac)