From 28d583730944db3cbd588fff19b2f969b522dd15 Mon Sep 17 00:00:00 2001 From: Erik Date: Tue, 16 Jun 2026 22:25:59 +0200 Subject: [PATCH] =?UTF-8?q?test(D.5.1):=20cover=20UiItemSlot.Clear=20(revi?= =?UTF-8?q?ew=20=E2=80=94=20hot=20path=20in=20ToolbarController)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/AcDream.App.Tests/UI/UiItemSlotTests.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/AcDream.App.Tests/UI/UiItemSlotTests.cs b/tests/AcDream.App.Tests/UI/UiItemSlotTests.cs index 381c281c..489fdf65 100644 --- a/tests/AcDream.App.Tests/UI/UiItemSlotTests.cs +++ b/tests/AcDream.App.Tests/UI/UiItemSlotTests.cs @@ -28,4 +28,14 @@ public class UiItemSlotTests Assert.Equal(0x5001u, s.ItemId); Assert.Equal(0x99u, s.IconTexture); } + + [Fact] + public void Clear_afterSetItem_resetsToEmpty() + { + var s = new UiItemSlot(); + s.SetItem(0x5001u, 0x99u); + s.Clear(); + Assert.Equal(0u, s.ItemId); + Assert.Equal(0u, s.IconTexture); + } }