From 9373fb5d3dc94ab289f4d4b245af9428535a34ce Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 11 Aug 2026 13:37:51 +0200 Subject: [PATCH 1/2] Remove UI tests that only restate the code they cover These fixtures were written while porting to Avalonia, as an author's own verification step rather than as coverage: reflection asserting that a type derives from its base and that a property has the type it is declared with; literals (MinHeight 29, Padding 3, MaxWidth 900) copied out of the .axaml beside them; a property override asserted only so pane descendants stay reachable from tests. None of them can fail except when someone deliberately edits the line they mirror, and then they fail as a chore. StartupPerfTests keeps its two [Explicit] benchmarks, which print per-phase timings worth reading. The third was a wall-clock assertion (8 CoreLib copies must settle in under 15s) that ran in CI, where a shared runner decides the verdict; as [Explicit] it would be strictly dominated by the 200-assembly benchmark it was derived from, so it goes. Two fixtures are trimmed rather than deleted, because their kernel is real: XmlDocLoader's ref-pack fallback has no other test in the repo, and the MenuIcon metadata rasterisation was dropped once during the port already. Both now assert that without booting MainWindow to reach it. This is worth about two seconds - it buys reviewers less to read, not CI less to do. Assisted-by: Claude:claude-opus-5:Claude Code --- .../Bookmarks/BookmarksPaneStructureTests.cs | 17 ----- ILSpy.Tests/Diagnostics/StartupPerfTests.cs | 51 --------------- .../Docking/ContentPageHierarchyTests.cs | 62 ------------------ .../DocumentationRendererTooltipWidthTests.cs | 29 ++------- ILSpy.Tests/Editor/XmlDocumentationTests.cs | 65 +++++++------------ ...conWiringProbe.cs => MainMenuIconTests.cs} | 32 +-------- .../ToolPaneDeferredContentTests.cs | 47 -------------- 7 files changed, 30 insertions(+), 273 deletions(-) delete mode 100644 ILSpy.Tests/Docking/ContentPageHierarchyTests.cs rename ILSpy.Tests/MainWindow/{MenuIconWiringProbe.cs => MainMenuIconTests.cs} (62%) delete mode 100644 ILSpy.Tests/MainWindow/ToolPaneDeferredContentTests.cs diff --git a/ILSpy.Tests/Bookmarks/BookmarksPaneStructureTests.cs b/ILSpy.Tests/Bookmarks/BookmarksPaneStructureTests.cs index 39dae06f5b..f67523b242 100644 --- a/ILSpy.Tests/Bookmarks/BookmarksPaneStructureTests.cs +++ b/ILSpy.Tests/Bookmarks/BookmarksPaneStructureTests.cs @@ -26,7 +26,6 @@ using ICSharpCode.ILSpy.Bookmarks; using ICSharpCode.ILSpy.Properties; -using ICSharpCode.ILSpy.Views.Controls; using NUnit.Framework; @@ -35,22 +34,6 @@ namespace ICSharpCode.ILSpy.Tests.Bookmarks; [TestFixture] public class BookmarksPaneStructureTests { - [AvaloniaTest] - public void Toolbar_uses_main_toolbar_chrome_and_button_content() - { - var pane = new BookmarksPane(); - var toolbarBorder = pane.FindControl("ToolbarBorder")!; - var toolbarRoot = pane.FindControl("ToolbarRoot")!; - - toolbarBorder.BorderThickness.Should().Be(new Avalonia.Thickness(0, 0, 0, 1)); - toolbarBorder.MinHeight.Should().Be(29); - toolbarBorder.Padding.Should().Be(new Avalonia.Thickness(3)); - toolbarRoot.Children.OfType().Should().HaveCount(2); - toolbarRoot.Children.OfType