[gnome-builder] file-settings: fix test
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] file-settings: fix test
- Date: Tue, 19 Jun 2018 04:39:18 +0000 (UTC)
commit 21e5a258b7e5eeaac19fe10464a9e8b11cf3803c
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 18 21:04:26 2018 -0700
file-settings: fix test
We can't rely on this, because of async processing.
src/tests/test-ide-file-settings.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/tests/test-ide-file-settings.c b/src/tests/test-ide-file-settings.c
index 7d533bd60..446163c5f 100644
--- a/src/tests/test-ide-file-settings.c
+++ b/src/tests/test-ide-file-settings.c
@@ -29,7 +29,7 @@ test_filesettings (GCancellable *cancellable,
gpointer user_data)
{
g_autoptr(GTask) task = g_task_new (NULL, cancellable, callback, user_data);
- IdeFileSettings *settings = NULL;
+ IdeFileSettings *settings;
IdeContext *dummy;
IdeFile *file;
GFile *gfile;
@@ -45,7 +45,6 @@ test_filesettings (GCancellable *cancellable,
"file", file,
"context", dummy,
NULL);
- g_object_add_weak_pointer (G_OBJECT (settings), (gpointer *)&settings);
ide_file_settings_set_tab_width (settings, 8);
g_assert_cmpint (ide_file_settings_get_tab_width (settings), ==, 8);
@@ -92,8 +91,7 @@ test_filesettings (GCancellable *cancellable,
ide_file_settings_set_show_right_margin (settings, FALSE);
g_assert_false (ide_file_settings_get_show_right_margin (settings));
- g_object_unref (settings);
- g_assert (settings == NULL);
+ g_clear_object (&settings);
g_clear_object (&file);
g_clear_object (&gfile);
g_clear_object (&dummy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]