From ea549ebcd0d744bb00df51abfb7ed4498e975b0e Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Sat, 30 May 2026 08:23:29 +0200 Subject: [PATCH] test(selftest): remove dead ConfigMigrationV21 step superseded by V22 --- .../SelfTests/ConfigMigrationV21Step.cs | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 HellionChat/SelfTests/ConfigMigrationV21Step.cs diff --git a/HellionChat/SelfTests/ConfigMigrationV21Step.cs b/HellionChat/SelfTests/ConfigMigrationV21Step.cs deleted file mode 100644 index 90b683e..0000000 --- a/HellionChat/SelfTests/ConfigMigrationV21Step.cs +++ /dev/null @@ -1,63 +0,0 @@ -using Dalamud.Bindings.ImGui; -using Dalamud.Plugin.SelfTest; - -namespace HellionChat.SelfTests; - -// Pins the post-migration shape of the v21 config. The plugin schema -// gate stamps Config.Version = 21 right after load, so by the time -// /xlperf reaches this step the migration must already be complete -// and the five v21 fields must carry their declared defaults on a -// fresh install (or the saved values on an existing one). The probe -// only verifies the version stamp and the field types — it does not -// rewrite the user's config. -internal sealed class ConfigMigrationV21Step : ISelfTestStep -{ - public ConfigMigrationV21Step(Plugin plugin) - { - _ = plugin; - } - - public string Name => "Hellion Chat - Config v21 migration"; - - public SelfTestStepResult RunStep() - { - if (Plugin.Config.Version != 21) - { - ImGui.Text($"Config.Version is {Plugin.Config.Version}, expected 21"); - return SelfTestStepResult.Fail; - } - - if (Plugin.Config.MaxParallelPopouts <= 0) - { - ImGui.Text( - $"Config.MaxParallelPopouts is {Plugin.Config.MaxParallelPopouts}, must be > 0" - ); - return SelfTestStepResult.Fail; - } - - if (Plugin.Config.SidebarAutoSwitchThresholdPx <= 0) - { - ImGui.Text( - $"Config.SidebarAutoSwitchThresholdPx is {Plugin.Config.SidebarAutoSwitchThresholdPx}, must be > 0" - ); - return SelfTestStepResult.Fail; - } - - if (!Enum.IsDefined(Plugin.Config.TellAutoOpenMode)) - { - ImGui.Text($"Config.TellAutoOpenMode {Plugin.Config.TellAutoOpenMode} is out of range"); - return SelfTestStepResult.Fail; - } - - // MainWindowOpen and SettingsWindowOpen are bool — declaration alone - // proves the migration emitted them with defaults; reading them - // here is just a touch-test that the property is reachable. - _ = Plugin.Config.MainWindowOpen; - _ = Plugin.Config.SettingsWindowOpen; - _ = Plugin.Config.ScreenshotMode; - - return SelfTestStepResult.Pass; - } - - public void CleanUp() { } -}