[gtk+] Corrections to has-child filter tests



commit a172697d4774ca1efeabd9fca7f66c26c4b000fe
Author: Kristian Rietveld <kris gtk org>
Date:   Fri May 20 20:21:11 2011 +0200

    Corrections to has-child filter tests

 gtk/tests/filtermodel.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/tests/filtermodel.c b/gtk/tests/filtermodel.c
index 268c1d1..946ec71 100644
--- a/gtk/tests/filtermodel.c
+++ b/gtk/tests/filtermodel.c
@@ -2448,6 +2448,7 @@ specific_has_child_filter (void)
   /* When the child comes in, this node will become visible */
   signal_monitor_append_signal (fixture.monitor, ROW_INSERTED, "1");
   signal_monitor_append_signal (fixture.monitor, ROW_HAS_CHILD_TOGGLED, "1");
+  signal_monitor_append_signal (fixture.monitor, ROW_HAS_CHILD_TOGGLED, "1");
   signal_monitor_append_signal (fixture.monitor, ROW_CHANGED, "1");
   signal_monitor_append_signal (fixture.monitor, ROW_HAS_CHILD_TOGGLED, "1");
 
@@ -2592,6 +2593,7 @@ specific_root_has_child_filter (void)
   /* Adding a child node which also makes parent at path 1 visible. */
   signal_monitor_append_signal (fixture.monitor, ROW_INSERTED, "1");
   signal_monitor_append_signal (fixture.monitor, ROW_HAS_CHILD_TOGGLED, "1");
+  signal_monitor_append_signal (fixture.monitor, ROW_HAS_CHILD_TOGGLED, "1");
 
   gtk_tree_store_append (fixture.store, &iter, &root);
   check_level_length (fixture.filter, NULL, 2);
@@ -2621,10 +2623,11 @@ specific_root_has_child_filter (void)
   check_level_length (fixture.filter, "1", 2);
   signal_monitor_assert_is_empty (fixture.monitor);
 
-  /* Set a child node to invisible */
-  signal_monitor_append_signal (fixture.monitor, ROW_DELETED, "0:0");
-  signal_monitor_append_signal (fixture.monitor, ROW_HAS_CHILD_TOGGLED, "0");
-  signal_monitor_append_signal (fixture.monitor, ROW_DELETED, "0");
+  /* Set a child node to invisible.  This should not yield any
+   * change, because filtering is only done on whether the root
+   * node has a child, which it still has.
+   */
+  signal_monitor_append_signal (fixture.monitor, ROW_CHANGED, "0:0");
 
   set_path_visibility (&fixture, "0:0", FALSE);
   signal_monitor_assert_is_empty (fixture.monitor);



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