tests: Don't leak profiles and test that
We finalize the theme first so the last reference is dropped when finalizing the profiles.
This commit is contained in:
@@ -36,7 +36,7 @@ test_fbd_feedback_theme_profiles (void)
|
||||
g_autoptr (FbdFeedbackDummy) full_fb2 = g_object_new (FBD_TYPE_FEEDBACK_DUMMY,
|
||||
"event-name", "event2",
|
||||
NULL);
|
||||
g_autoptr(FbdFeedbackTheme) theme = fbd_feedback_theme_new (THEME_NAME);
|
||||
FbdFeedbackTheme *theme = fbd_feedback_theme_new (THEME_NAME);
|
||||
FbdFeedbackProfile *profile_full = fbd_feedback_profile_new ("full");
|
||||
FbdFeedbackProfile *profile_quiet = fbd_feedback_profile_new ("quiet");
|
||||
FbdFeedbackProfile *profile;
|
||||
@@ -57,6 +57,10 @@ test_fbd_feedback_theme_profiles (void)
|
||||
|
||||
json = json_gobject_to_data (G_OBJECT(theme), NULL);
|
||||
g_print ("%s\n", json);
|
||||
|
||||
g_assert_finalize_object (theme);
|
||||
g_assert_finalize_object (profile_full);
|
||||
g_assert_finalize_object (profile_quiet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user