slicelistmodel: Improve a test
authorMatthias Clasen <mclasen@redhat.com>
Sun, 17 Jul 2022 10:27:39 +0000 (06:27 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 17 Jul 2022 10:32:15 +0000 (06:32 -0400)
Make sure that replacements in the underlying model
don't affect the slice list model if they are outside
the slice window.

testsuite/gtk/slicelistmodel.c

index da87c8bd30dc1b54d61f7427ea4e8ff08ced1619..84a4ac72baec6b0393f0be5dacba2f120b2a0ce0 100644 (file)
@@ -305,6 +305,15 @@ test_changes (void)
   g_list_store_remove (store, 19);
   assert_changes (slice, "");
 
+  splice (store, 1, 1, (guint[]) { 111 }, 1);
+  assert_changes (slice, "");
+
+  splice (store, 18, 1, (guint[]) { 19, 20 }, 2);
+  assert_changes (slice, "");
+
+  g_list_store_remove (store, 19);
+  assert_changes (slice, "");
+
   g_list_store_remove (store, 1);
   assert_model (slice, "12 13 14 15 16");
   assert_changes (slice, "0-5+5");