Lei Zhang : comctl32: Move tab test's createParentWindow() into START_TEST( ).

Alexandre Julliard julliard at winehq.org
Tue Oct 30 08:32:47 CDT 2007


Module: wine
Branch: master
Commit: c5a17f98df43d5cac9b666334c9135479b7d935d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c5a17f98df43d5cac9b666334c9135479b7d935d

Author: Lei Zhang <thestig at google.com>
Date:   Mon Oct 29 16:39:10 2007 -0700

comctl32: Move tab test's createParentWindow() into START_TEST().

---

 dlls/comctl32/tests/tab.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c
index 1787a8b..784901d 100644
--- a/dlls/comctl32/tests/tab.c
+++ b/dlls/comctl32/tests/tab.c
@@ -593,16 +593,14 @@ static void test_tab(INT nMinTabWidth)
     DeleteObject(hFont);
 }
 
-static void test_getters_setters(INT nTabs)
+static void test_getters_setters(HWND parent_wnd, INT nTabs)
 {
     HWND hTab;
-    HWND parent_wnd;
     RECT rTab;
     INT nTabsRetrieved;
     INT rowCount;
 
-    parent_wnd = createParentWindow();
-    ok(parent_wnd != NULL, "Failed to create parent window!\n");
+    ok(parent_wnd != NULL, "no parent window!\n");
     flush_sequences(sequences, NUM_MSG_SEQUENCES);
 
     hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs);
@@ -810,11 +808,11 @@ static void test_getters_setters(INT nTabs)
     }
 
     DestroyWindow(hTab);
-    DestroyWindow(parent_wnd);
 }
 
 START_TEST(tab)
 {
+    HWND parent_wnd;
     LOGFONTA logfont;
 
     lstrcpyA(logfont.lfFaceName, "Arial");
@@ -839,6 +837,10 @@ START_TEST(tab)
 
     init_msg_sequences(sequences, NUM_MSG_SEQUENCES);
 
+    parent_wnd = createParentWindow();
+    ok(parent_wnd != NULL, "Failed to create parent window!\n");
+
     /* Testing getters and setters with 5 tabs */
-    test_getters_setters(5);
+    test_getters_setters(parent_wnd, 5);
+    DestroyWindow(parent_wnd);
 }




More information about the wine-cvs mailing list