SHELL32/tests: rearrange some moved code

Saulius Krasuckas saulius2 at ar.fi.lt
Wed Jun 22 04:39:51 CDT 2005


* On Wed, 22 Jun 2005, Saulius Krasuckas wrote:
> Oops, I have moved one line too much in my last patch, AFAICS.

Plus some more code maneuvers.  Obsoletes my previous patch:
http://www.winehq.org/hypermail/wine-patches/2005/06/0574.html


ChangeLog:
	Saulius Krasuckas <saulius.krasuckas at ieee.org>
	- Move test init code back to START_TEST(shlfolder).
	- Move creation and cleanup of a test-folders nearer to 
	test_EnumObjects.


Index: dlls/shell32/tests/shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/tests/shlfolder.c,v
retrieving revision 1.17
diff -p -u -r1.17 shlfolder.c
--- dlls/shell32/tests/shlfolder.c	21 Jun 2005 20:04:17 -0000	1.17
+++ dlls/shell32/tests/shlfolder.c	22 Jun 2005 09:24:42 -0000
@@ -455,8 +455,6 @@ static void test_EnumObjects_and_Compare
     WCHAR cCurrDirW [MAX_PATH];
     static const WCHAR cTestDirW[] = {'\\','t','e','s','t','d','i','r',0};
     HRESULT hr;
-    
-    init_function_pointers();
 
     GetCurrentDirectoryA(MAX_PATH, cCurrDirA);
     MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH);
@@ -467,29 +465,31 @@ static void test_EnumObjects_and_Compare
     hr = SHGetMalloc(&ppM);
     ok(hr == S_OK, "SHGetMalloc failed %08lx\n", hr);
 
-    CreateFilesFolders();
-    
     hr = SHGetDesktopFolder(&IDesktopFolder);
     ok(hr == S_OK, "SHGetDesktopfolder failed %08lx\n", hr);
 
+    CreateFilesFolders();
+
     hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cCurrDirW, NULL, &newPIDL, 0);
     ok(hr == S_OK, "ParseDisplayName failed %08lx\n", hr);
 
     hr = IShellFolder_BindToObject(IDesktopFolder, newPIDL, NULL, (REFIID)&IID_IShellFolder, (LPVOID *)&testIShellFolder);
     ok(hr == S_OK, "BindToObject failed %08lx\n", hr);
-        
+
     test_EnumObjects(testIShellFolder);
 
     hr = IShellFolder_Release(testIShellFolder);
     ok(hr == S_OK, "IShellFolder_Release failed %08lx\n", hr);
 
-    IMalloc_Free(ppM, newPIDL);
-
     Cleanup();
+
+    IMalloc_Free(ppM, newPIDL);
 }
 
 START_TEST(shlfolder)
 {
+    init_function_pointers();
+
     test_EnumObjects_and_CompareIDs();
     test_BindToObject();
     test_GetDisplayName();



More information about the wine-patches mailing list