From 69d1f7f5b8a88839121353cfb0ee3d705cf30d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Thu, 14 Nov 2024 13:43:17 +0100 Subject: [PATCH] Add another test for partial replace operation For no particular reason other than to see if it does the right thing, and it does. --- .../UserInterface/TestSceneRearrangeableListContainer.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneRearrangeableListContainer.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneRearrangeableListContainer.cs index c4397a8c50..9c3ede1100 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneRearrangeableListContainer.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneRearrangeableListContainer.cs @@ -333,6 +333,15 @@ public void TestReplaceEntireList() AddUntilStep("wait for items to load", () => list.ItemMap.Values.All(i => i.IsLoaded)); } + [Test] + public void TestPartialReplace() + { + addItems(5); + + AddStep("replace list", () => list.Items.ReplaceRange(2, 2, [100, 101])); + AddUntilStep("wait for items to load", () => list.ItemMap.Values.All(i => i.IsLoaded)); + } + private void addDragSteps(int from, int to, int[] expectedSequence) { AddStep($"move to {from}", () =>