From d840e082e6a376a13613060d13b32c60ab9c63e0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 17 Jul 2022 06:27:39 -0400 Subject: [PATCH] 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. --- testsuite/gtk/slicelistmodel.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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");