From: Matthias Clasen Date: Sun, 17 Jul 2022 10:27:39 +0000 (-0400) Subject: slicelistmodel: Improve a test X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~20^2~4^2~52^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d840e082e6a376a13613060d13b32c60ab9c63e0;p=gtk4.git slicelistmodel: Improve a test Make sure that replacements in the underlying model don't affect the slice list model if they are outside the slice window. --- diff --git a/testsuite/gtk/slicelistmodel.c b/testsuite/gtk/slicelistmodel.c index da87c8bd30..84a4ac72ba 100644 --- a/testsuite/gtk/slicelistmodel.c +++ b/testsuite/gtk/slicelistmodel.c @@ -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");