[libadwaita/msvc] test-tab-view.c: Fix fallout due to dropping g_autoptr()



commit 5fa9a940c2f424f0a7c0c118c9a6eb2b16d85a73
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jan 19 11:04:08 2022 +0800

    test-tab-view.c: Fix fallout due to dropping g_autoptr()
    
    We are now going back to automatically g_object_unref()'ing the AdwTabPage
    objects that we create in adw-tab-view.c via create_and_insert_page()
    internally, and via adw_tab_view_get_nth_page().  So, fix the fallout that
    was caused as a result in the test program as we added extra g_object_unref's()
    in there that were actually not to be added with the automatically unref'ing
    of the AdwTabPage objects.

 tests/test-tab-view.c | 3 ---
 1 file changed, 3 deletions(-)
---
diff --git a/tests/test-tab-view.c b/tests/test-tab-view.c
index 085595b8..5033c39c 100644
--- a/tests/test-tab-view.c
+++ b/tests/test-tab-view.c
@@ -152,7 +152,6 @@ test_adw_tab_view_n_pinned_pages (void)
   g_assert_cmpint (notified, ==, 3);
 
   g_assert_finalize_object (view);
-  g_object_unref (page);
 }
 
 static void
@@ -1020,7 +1019,6 @@ test_adw_tab_page_icon (void)
   g_object_set (page, "icon", icon2, NULL);
   g_assert_true (adw_tab_page_get_icon (page) == icon2);
   g_assert_cmpint (notified, ==, 2);
-  g_object_unref (icon2);
 
   g_assert_finalize_object (view);
   g_assert_finalize_object (icon1);
@@ -1086,7 +1084,6 @@ test_adw_tab_page_indicator_icon (void)
   g_object_set (page, "indicator-icon", icon2, NULL);
   g_assert_true (adw_tab_page_get_indicator_icon (page) == icon2);
   g_assert_cmpint (notified, ==, 2);
-  g_object_unref (icon2);
 
   g_assert_finalize_object (view);
   g_assert_finalize_object (icon1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]