From 0677ababeed4b4088e870bc27127478d8e4d7581 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 09:18:30 +0000 Subject: [PATCH 1/4] ci: name the editor UI suite Schema.Editor.UITests The shared `dotnet.yml` runs UI test suites on Linux only, and says so as one glob on the non-Linux runners: ktsubuild test all --workspace "$GITHUB_WORKSPACE" --verbose --exclude "**/*.UITests/*" This repository's UI suite was called `Schema.Editor.Test`, which that glob does not match, so it was the one ktsu UI suite running on Windows and macOS. On macOS it also failed - two ImGui probe assertions that pass on Linux and Windows - which is what made `main` red there. Renaming the project is what applies the existing rule rather than editing the workflow: `.github/workflows/dotnet.yml` is byte-identical across all 48 ktsu .NET repositories, and a repo-local edit would reintroduce exactly the drift that consolidation removed. The suite still runs in full on Linux on every pull request, which is where the rule puts every other ktsu UI suite. It is unchanged otherwise: 202 tests, all passing, renamed namespace only. Verified the glob rather than assuming it. Against both DotNet.Glob and Microsoft.Extensions.FileSystemGlobbing, relative and runner-absolute: MATCH Schema.Editor.UITests/Schema.Editor.UITests.csproj MATCH /Users/runner/work/Schema/Schema/Schema.Editor.UITests/... no Schema.Editor.Test/Schema.Editor.Test.csproj The old name matching nothing is why it ran everywhere. Also updated: the four `InternalsVisibleTo` declarations naming the assembly, the solution entry, and the five documents that named the project. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015qxqZVzN8CJcDxTb5gtWua --- CLAUDE.md | 6 +++--- README.md | 2 +- Schema.Cpp/AssemblyInfo.cs | 2 +- .../AssemblyInfo.cs | 0 .../ClassGraphTests.cs | 2 +- .../CodeGeneratorPanelTests.cs | 2 +- .../DiagnosticsPanelTests.cs | 2 +- .../DiagnosticsTests.cs | 2 +- .../DocumentGuardTests.cs | 2 +- .../EditFieldTests.cs | 2 +- .../EditorHarness.cs | 2 +- .../ElementPanelTests.cs | 2 +- .../FileBrowserTests.cs | 2 +- .../HarnessSmokeTests.cs | 2 +- .../MemberPanelTests.cs | 2 +- .../MemberSemanticsTests.cs | 2 +- {Schema.Editor.Test => Schema.Editor.UITests}/MenuTests.cs | 2 +- .../RecentFilesTests.cs | 2 +- .../Schema.Editor.UITests.csproj | 0 .../SchemaFileTests.cs | 2 +- .../ShortcutTests.cs | 2 +- .../ThemeBrowserTests.cs | 2 +- {Schema.Editor.Test => Schema.Editor.UITests}/ThemeTests.cs | 2 +- .../TreeContextMenuTests.cs | 2 +- .../TreeEditingTests.cs | 2 +- .../TreeNavigationTests.cs | 2 +- .../TreeRowWidthTests.cs | 2 +- .../ValidationMarkingTests.cs | 2 +- .../WidgetHarness.cs | 2 +- Schema.Editor/AppData.cs | 2 +- Schema.Tool/Program.cs | 2 +- Schema.sln | 2 +- Schema/AssemblyInfo.cs | 2 +- docs/README.md | 2 +- docs/ROADMAP.md | 4 ++-- docs/development/README.md | 4 ++-- 36 files changed, 38 insertions(+), 38 deletions(-) rename {Schema.Editor.Test => Schema.Editor.UITests}/AssemblyInfo.cs (100%) rename {Schema.Editor.Test => Schema.Editor.UITests}/ClassGraphTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/CodeGeneratorPanelTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/DiagnosticsPanelTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/DiagnosticsTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/DocumentGuardTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/EditFieldTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/EditorHarness.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/ElementPanelTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/FileBrowserTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/HarnessSmokeTests.cs (95%) rename {Schema.Editor.Test => Schema.Editor.UITests}/MemberPanelTests.cs (98%) rename {Schema.Editor.Test => Schema.Editor.UITests}/MemberSemanticsTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/MenuTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/RecentFilesTests.cs (98%) rename Schema.Editor.Test/Schema.Editor.Test.csproj => Schema.Editor.UITests/Schema.Editor.UITests.csproj (100%) rename {Schema.Editor.Test => Schema.Editor.UITests}/SchemaFileTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/ShortcutTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/ThemeBrowserTests.cs (97%) rename {Schema.Editor.Test => Schema.Editor.UITests}/ThemeTests.cs (98%) rename {Schema.Editor.Test => Schema.Editor.UITests}/TreeContextMenuTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/TreeEditingTests.cs (99%) rename {Schema.Editor.Test => Schema.Editor.UITests}/TreeNavigationTests.cs (98%) rename {Schema.Editor.Test => Schema.Editor.UITests}/TreeRowWidthTests.cs (98%) rename {Schema.Editor.Test => Schema.Editor.UITests}/ValidationMarkingTests.cs (98%) rename {Schema.Editor.Test => Schema.Editor.UITests}/WidgetHarness.cs (98%) diff --git a/CLAUDE.md b/CLAUDE.md index d502c55..65f0601 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,7 +11,7 @@ Schema is a C# library for defining and managing data structure schemas. It cons - **Schema.Cpp** - The C++ generator, in its own project because `ktsu.Coder` ships no `net8.0` - **Schema.Cpp.Test** - Its tests, including the three acceptance tests against Holotype's target document and one that compiles the generated reflection table - **Schema.Editor** - ImGui-based visual editor application for creating and editing `.schema.json` files -- **Schema.Editor.Test** - Headless UI tests for the editor, driven through `ktsu.ImGui.App.Testing` +- **Schema.Editor.UITests** - Headless UI tests for the editor, driven through `ktsu.ImGui.App.Testing`. Named `.UITests` so the shared `dotnet.yml` runs it on Linux only, as it does every other ktsu UI suite - **Schema.Tool** - The `dotnet tool` (`kschema`) that validates schemas and runs their code generators ## Build Commands @@ -519,8 +519,8 @@ as the property initialiser as well, so a generated instance starts at it. - `Schema.Editor/EditorHost.cs` - Builds the `ImGuiAppConfig`; `CreateConfig` is what the tests drive too - `Schema.Editor/EditorTheme.cs` - The ktsu.ThemeProvider theme, and the one definition of how a validation issue is coloured - `Schema.Editor/Program.cs` - The entry point, and the only file excluded from coverage measurement -- `Schema.Editor.Test/EditorHarness.cs` - Runs a real editor headlessly, frames advanced by the test -- `Schema.Editor.Test/WidgetHarness.cs` - A headless frame containing only the widget under test, and an editor for a panel that is one +- `Schema.Editor.UITests/EditorHarness.cs` - Runs a real editor headlessly, frames advanced by the test +- `Schema.Editor.UITests/WidgetHarness.cs` - A headless frame containing only the widget under test, and an editor for a panel that is one ### Addressing the editor from a test diff --git a/README.md b/README.md index 3a52f62..c2b5230 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The solution contains seven projects: - **Schema.Cpp** - The C++ generator, published separately as [`ktsu.Schema.Cpp`](https://nuget.org/packages/ktsu.Schema.Cpp) - **Schema.Cpp.Test** - Its tests, including acceptance tests against a real target's document - **Schema.Editor** - ImGui-based desktop application for visual schema editing -- **Schema.Editor.Test** - Headless UI tests that drive the editor with no window or display +- **Schema.Editor.UITests** - Headless UI tests that drive the editor with no window or display - **Schema.Tool** - Command line entry point for validating schemas and running their code generators `Schema.Cpp` is a separate package rather than part of the library because the AST it builds on diff --git a/Schema.Cpp/AssemblyInfo.cs b/Schema.Cpp/AssemblyInfo.cs index 33c4c88..26af534 100644 --- a/Schema.Cpp/AssemblyInfo.cs +++ b/Schema.Cpp/AssemblyInfo.cs @@ -4,5 +4,5 @@ // KTSU0002 asks a non-test project to expose its internals to the repository's test projects // rather than to the one that happens to need them. [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Test")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.Test")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.UITests")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Cpp.Test")] diff --git a/Schema.Editor.Test/AssemblyInfo.cs b/Schema.Editor.UITests/AssemblyInfo.cs similarity index 100% rename from Schema.Editor.Test/AssemblyInfo.cs rename to Schema.Editor.UITests/AssemblyInfo.cs diff --git a/Schema.Editor.Test/ClassGraphTests.cs b/Schema.Editor.UITests/ClassGraphTests.cs similarity index 99% rename from Schema.Editor.Test/ClassGraphTests.cs rename to Schema.Editor.UITests/ClassGraphTests.cs index b3b2a33..098dbe5 100644 --- a/Schema.Editor.Test/ClassGraphTests.cs +++ b/Schema.Editor.UITests/ClassGraphTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System.Linq; using System.Numerics; diff --git a/Schema.Editor.Test/CodeGeneratorPanelTests.cs b/Schema.Editor.UITests/CodeGeneratorPanelTests.cs similarity index 99% rename from Schema.Editor.Test/CodeGeneratorPanelTests.cs rename to Schema.Editor.UITests/CodeGeneratorPanelTests.cs index 1d2a05c..53c19c4 100644 --- a/Schema.Editor.Test/CodeGeneratorPanelTests.cs +++ b/Schema.Editor.UITests/CodeGeneratorPanelTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO; diff --git a/Schema.Editor.Test/DiagnosticsPanelTests.cs b/Schema.Editor.UITests/DiagnosticsPanelTests.cs similarity index 99% rename from Schema.Editor.Test/DiagnosticsPanelTests.cs rename to Schema.Editor.UITests/DiagnosticsPanelTests.cs index 9842348..3d2246e 100644 --- a/Schema.Editor.Test/DiagnosticsPanelTests.cs +++ b/Schema.Editor.UITests/DiagnosticsPanelTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System.Linq; diff --git a/Schema.Editor.Test/DiagnosticsTests.cs b/Schema.Editor.UITests/DiagnosticsTests.cs similarity index 99% rename from Schema.Editor.Test/DiagnosticsTests.cs rename to Schema.Editor.UITests/DiagnosticsTests.cs index 0a0b4fb..2b3ba72 100644 --- a/Schema.Editor.Test/DiagnosticsTests.cs +++ b/Schema.Editor.UITests/DiagnosticsTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System.Linq; diff --git a/Schema.Editor.Test/DocumentGuardTests.cs b/Schema.Editor.UITests/DocumentGuardTests.cs similarity index 99% rename from Schema.Editor.Test/DocumentGuardTests.cs rename to Schema.Editor.UITests/DocumentGuardTests.cs index 10d5e95..69e605d 100644 --- a/Schema.Editor.Test/DocumentGuardTests.cs +++ b/Schema.Editor.UITests/DocumentGuardTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO; diff --git a/Schema.Editor.Test/EditFieldTests.cs b/Schema.Editor.UITests/EditFieldTests.cs similarity index 99% rename from Schema.Editor.Test/EditFieldTests.cs rename to Schema.Editor.UITests/EditFieldTests.cs index 7f03b1f..13d7aa9 100644 --- a/Schema.Editor.Test/EditFieldTests.cs +++ b/Schema.Editor.UITests/EditFieldTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.Numerics; diff --git a/Schema.Editor.Test/EditorHarness.cs b/Schema.Editor.UITests/EditorHarness.cs similarity index 99% rename from Schema.Editor.Test/EditorHarness.cs rename to Schema.Editor.UITests/EditorHarness.cs index e30e232..670c990 100644 --- a/Schema.Editor.Test/EditorHarness.cs +++ b/Schema.Editor.UITests/EditorHarness.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO.Abstractions.TestingHelpers; diff --git a/Schema.Editor.Test/ElementPanelTests.cs b/Schema.Editor.UITests/ElementPanelTests.cs similarity index 99% rename from Schema.Editor.Test/ElementPanelTests.cs rename to Schema.Editor.UITests/ElementPanelTests.cs index c7d7b88..fc7f19b 100644 --- a/Schema.Editor.Test/ElementPanelTests.cs +++ b/Schema.Editor.UITests/ElementPanelTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO; diff --git a/Schema.Editor.Test/FileBrowserTests.cs b/Schema.Editor.UITests/FileBrowserTests.cs similarity index 99% rename from Schema.Editor.Test/FileBrowserTests.cs rename to Schema.Editor.UITests/FileBrowserTests.cs index 490fb54..3aad4fd 100644 --- a/Schema.Editor.Test/FileBrowserTests.cs +++ b/Schema.Editor.UITests/FileBrowserTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO; diff --git a/Schema.Editor.Test/HarnessSmokeTests.cs b/Schema.Editor.UITests/HarnessSmokeTests.cs similarity index 95% rename from Schema.Editor.Test/HarnessSmokeTests.cs rename to Schema.Editor.UITests/HarnessSmokeTests.cs index a26da4f..ca15ed8 100644 --- a/Schema.Editor.Test/HarnessSmokeTests.cs +++ b/Schema.Editor.UITests/HarnessSmokeTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; /// /// That the harness itself works: without these, a failure anywhere else is ambiguous between the diff --git a/Schema.Editor.Test/MemberPanelTests.cs b/Schema.Editor.UITests/MemberPanelTests.cs similarity index 98% rename from Schema.Editor.Test/MemberPanelTests.cs rename to Schema.Editor.UITests/MemberPanelTests.cs index 01790d6..9fb5ccf 100644 --- a/Schema.Editor.Test/MemberPanelTests.cs +++ b/Schema.Editor.UITests/MemberPanelTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System.Linq; diff --git a/Schema.Editor.Test/MemberSemanticsTests.cs b/Schema.Editor.UITests/MemberSemanticsTests.cs similarity index 99% rename from Schema.Editor.Test/MemberSemanticsTests.cs rename to Schema.Editor.UITests/MemberSemanticsTests.cs index af7527a..635211b 100644 --- a/Schema.Editor.Test/MemberSemanticsTests.cs +++ b/Schema.Editor.UITests/MemberSemanticsTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using ktsu.Schema.Models; using ktsu.Schema.Models.Metadata; diff --git a/Schema.Editor.Test/MenuTests.cs b/Schema.Editor.UITests/MenuTests.cs similarity index 99% rename from Schema.Editor.Test/MenuTests.cs rename to Schema.Editor.UITests/MenuTests.cs index 79a45c0..5a56212 100644 --- a/Schema.Editor.Test/MenuTests.cs +++ b/Schema.Editor.UITests/MenuTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO; diff --git a/Schema.Editor.Test/RecentFilesTests.cs b/Schema.Editor.UITests/RecentFilesTests.cs similarity index 98% rename from Schema.Editor.Test/RecentFilesTests.cs rename to Schema.Editor.UITests/RecentFilesTests.cs index 49b00e9..e79d825 100644 --- a/Schema.Editor.Test/RecentFilesTests.cs +++ b/Schema.Editor.UITests/RecentFilesTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System.Linq; diff --git a/Schema.Editor.Test/Schema.Editor.Test.csproj b/Schema.Editor.UITests/Schema.Editor.UITests.csproj similarity index 100% rename from Schema.Editor.Test/Schema.Editor.Test.csproj rename to Schema.Editor.UITests/Schema.Editor.UITests.csproj diff --git a/Schema.Editor.Test/SchemaFileTests.cs b/Schema.Editor.UITests/SchemaFileTests.cs similarity index 99% rename from Schema.Editor.Test/SchemaFileTests.cs rename to Schema.Editor.UITests/SchemaFileTests.cs index b6e9184..402d93b 100644 --- a/Schema.Editor.Test/SchemaFileTests.cs +++ b/Schema.Editor.UITests/SchemaFileTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO; diff --git a/Schema.Editor.Test/ShortcutTests.cs b/Schema.Editor.UITests/ShortcutTests.cs similarity index 99% rename from Schema.Editor.Test/ShortcutTests.cs rename to Schema.Editor.UITests/ShortcutTests.cs index 3411969..9abb911 100644 --- a/Schema.Editor.Test/ShortcutTests.cs +++ b/Schema.Editor.UITests/ShortcutTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO; diff --git a/Schema.Editor.Test/ThemeBrowserTests.cs b/Schema.Editor.UITests/ThemeBrowserTests.cs similarity index 97% rename from Schema.Editor.Test/ThemeBrowserTests.cs rename to Schema.Editor.UITests/ThemeBrowserTests.cs index da472e5..e774f86 100644 --- a/Schema.Editor.Test/ThemeBrowserTests.cs +++ b/Schema.Editor.UITests/ThemeBrowserTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; /// /// Picking a theme from the browser the Theme menu opens. diff --git a/Schema.Editor.Test/ThemeTests.cs b/Schema.Editor.UITests/ThemeTests.cs similarity index 98% rename from Schema.Editor.Test/ThemeTests.cs rename to Schema.Editor.UITests/ThemeTests.cs index 1099d1d..6dc99b2 100644 --- a/Schema.Editor.Test/ThemeTests.cs +++ b/Schema.Editor.UITests/ThemeTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; /// /// Which ktsu.ThemeProvider theme the editor runs under, and where that choice comes from. diff --git a/Schema.Editor.Test/TreeContextMenuTests.cs b/Schema.Editor.UITests/TreeContextMenuTests.cs similarity index 99% rename from Schema.Editor.Test/TreeContextMenuTests.cs rename to Schema.Editor.UITests/TreeContextMenuTests.cs index a2e6beb..35381ae 100644 --- a/Schema.Editor.Test/TreeContextMenuTests.cs +++ b/Schema.Editor.UITests/TreeContextMenuTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System.Linq; diff --git a/Schema.Editor.Test/TreeEditingTests.cs b/Schema.Editor.UITests/TreeEditingTests.cs similarity index 99% rename from Schema.Editor.Test/TreeEditingTests.cs rename to Schema.Editor.UITests/TreeEditingTests.cs index 870a64b..b8b279b 100644 --- a/Schema.Editor.Test/TreeEditingTests.cs +++ b/Schema.Editor.UITests/TreeEditingTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System.Linq; diff --git a/Schema.Editor.Test/TreeNavigationTests.cs b/Schema.Editor.UITests/TreeNavigationTests.cs similarity index 98% rename from Schema.Editor.Test/TreeNavigationTests.cs rename to Schema.Editor.UITests/TreeNavigationTests.cs index e297391..6d6e3e1 100644 --- a/Schema.Editor.Test/TreeNavigationTests.cs +++ b/Schema.Editor.UITests/TreeNavigationTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using ktsu.Schema.Models; using ktsu.Schema.Models.Names; diff --git a/Schema.Editor.Test/TreeRowWidthTests.cs b/Schema.Editor.UITests/TreeRowWidthTests.cs similarity index 98% rename from Schema.Editor.Test/TreeRowWidthTests.cs rename to Schema.Editor.UITests/TreeRowWidthTests.cs index 56fdf8d..78d1469 100644 --- a/Schema.Editor.Test/TreeRowWidthTests.cs +++ b/Schema.Editor.UITests/TreeRowWidthTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using ktsu.ImGui.App.Testing; using ktsu.Schema.Models; diff --git a/Schema.Editor.Test/ValidationMarkingTests.cs b/Schema.Editor.UITests/ValidationMarkingTests.cs similarity index 98% rename from Schema.Editor.Test/ValidationMarkingTests.cs rename to Schema.Editor.UITests/ValidationMarkingTests.cs index 16c3ef4..cb3f146 100644 --- a/Schema.Editor.Test/ValidationMarkingTests.cs +++ b/Schema.Editor.UITests/ValidationMarkingTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using ktsu.ImGui.App.Testing; using ktsu.Schema.Models; diff --git a/Schema.Editor.Test/WidgetHarness.cs b/Schema.Editor.UITests/WidgetHarness.cs similarity index 98% rename from Schema.Editor.Test/WidgetHarness.cs rename to Schema.Editor.UITests/WidgetHarness.cs index d81ad59..fe8e26c 100644 --- a/Schema.Editor.Test/WidgetHarness.cs +++ b/Schema.Editor.UITests/WidgetHarness.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.Test; +namespace ktsu.Schema.Editor.UITests; using System; using System.IO.Abstractions.TestingHelpers; diff --git a/Schema.Editor/AppData.cs b/Schema.Editor/AppData.cs index e0c138a..ba8d556 100644 --- a/Schema.Editor/AppData.cs +++ b/Schema.Editor/AppData.cs @@ -4,7 +4,7 @@ // ktsu.Sdk's KTSU0002 requires a non-test project to expose its internals to the repository's test // projects, and there are two of them now; which of the two a given project actually needs is not // what the rule is checking. -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.Test")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.UITests")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Test")] namespace ktsu.Schema.Editor; diff --git a/Schema.Tool/Program.cs b/Schema.Tool/Program.cs index 862b436..596e1fb 100644 --- a/Schema.Tool/Program.cs +++ b/Schema.Tool/Program.cs @@ -5,7 +5,7 @@ // projects, and there are two of them now; which of the two a given project actually needs is not // what the rule is checking. [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Test")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.Test")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.UITests")] namespace ktsu.Schema.Tool; diff --git a/Schema.sln b/Schema.sln index a4011b9..31f9d7c 100644 --- a/Schema.sln +++ b/Schema.sln @@ -11,7 +11,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Editor", "Schema.Edi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Tool", "Schema.Tool\Schema.Tool.csproj", "{1EBD8E07-A2A3-4091-8748-ECFEB1D301F0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Editor.Test", "Schema.Editor.Test\Schema.Editor.Test.csproj", "{31DEE39F-3542-4B65-B744-74243D28D878}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Editor.UITests", "Schema.Editor.UITests\Schema.Editor.UITests.csproj", "{31DEE39F-3542-4B65-B744-74243D28D878}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Cpp", "Schema.Cpp\Schema.Cpp.csproj", "{93D1BF5F-D2C4-46C4-A783-2F6F4B7AA6B7}" EndProject diff --git a/Schema/AssemblyInfo.cs b/Schema/AssemblyInfo.cs index c139378..b242721 100644 --- a/Schema/AssemblyInfo.cs +++ b/Schema/AssemblyInfo.cs @@ -5,4 +5,4 @@ // projects, and there are two of them now; which of the two a given project actually needs is not // what the rule is checking. [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Test")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.Test")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.UITests")] diff --git a/docs/README.md b/docs/README.md index 0a64e95..1e41b0b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -64,7 +64,7 @@ if (SchemaSerializer.TryDeserialize(File.ReadAllText("user.schema.json"), out Sc - **[Schema](api/schema-core.md)** - Core library containing the schema definition system - **[Schema.Editor](features/schema-editor.md)** - Visual editor application - **Schema.Tool** - Command line validator and code generator runner -- **Schema.Test** / **Schema.Editor.Test** - MSTest suites for the library and the editor (see the [development guide](development/README.md)) +- **Schema.Test** / **Schema.Editor.UITests** - MSTest suites for the library and the editor (see the [development guide](development/README.md)) ## Documentation diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index fac11ef..5b5e91f 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -38,7 +38,7 @@ time. For what the library actually does, the tests in recent-files list. - **CLI** — `Schema.Tool` validates a schema or runs its code generators, exiting non-zero on errors so it can gate a build. -- **Editor tests** — `Schema.Editor.Test` drives the editor headlessly through +- **Editor tests** — `Schema.Editor.UITests` drives the editor headlessly through `ktsu.ImGui.App.Testing`, which rasterizes in software and injects input straight into ImGui, so the editor's real draw code runs on a continuous integration runner with no window or display. - **CI/CD** — GitHub Actions with build, multi-framework test, SonarCloud analysis, CodeQL, NuGet @@ -103,7 +103,7 @@ Outstanding: editor packaging via winget, and cutting the v2.0 milestone. Not one of the original phases; added when the editor grew large enough to need one. -`Schema.Editor.Test` ([#128](https://github.com/ktsu-dev/Schema/issues/128)) drives the editor +`Schema.Editor.UITests` ([#128](https://github.com/ktsu-dev/Schema/issues/128)) drives the editor headlessly. It covers the recent-files list, the commit-once text field, the unsaved-changes guard and the save-then-continue sequence, validation debouncing and click-to-navigate, and — by addressing widgets through the names the editor marks them with — the schema tree, its context diff --git a/docs/development/README.md b/docs/development/README.md index 25341a4..c5308d0 100644 --- a/docs/development/README.md +++ b/docs/development/README.md @@ -46,7 +46,7 @@ dotnet run --project Schema.Editor | `Schema/` | Core schema definition library | | `Schema.Test/` | MSTest unit tests for the library | | `Schema.Editor/` | ImGui-based visual editor | -| `Schema.Editor.Test/` | Headless UI tests for the editor | +| `Schema.Editor.UITests/` | Headless UI tests for the editor | | `Schema.Tool/` | Command line validator and generator | | `docs/` | Markdown documentation | | `scripts/` | Build automation (PSBuild) | @@ -69,7 +69,7 @@ Plain unit tests over the core library, run against every framework it publishes suites (`SchemaTests`, `SchemaClassTests`, `SchemaEnumTests`, `TypeSystemTests`, `SchemaSerializerTests`, `AddClassFromTypeTests`) show the conventions in use. -### The editor — `Schema.Editor.Test` +### The editor — `Schema.Editor.UITests` The editor's code is immediate-mode draw calls, so none of it executes without a live ImGui context. `ktsu.ImGui.App.Testing` supplies one with no window, no display and no GPU: it rasterizes From 7c1e891f6545ffdf8e2350cd1c0477ab6f91aee0 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 09:23:24 +0000 Subject: [PATCH 2/4] test: keep the editor's frameless tests off the Linux-only rule The rename in the previous commit applied the UI-suite rule to the whole editor suite, and thirteen of its tests are not UI tests. Twenty of the twenty-two files drive real frames through EditorHarness or WidgetHarness. Two do not, and say so themselves: RecentFilesTests - "Pure logic - no ImGui context needed" SchemaFileTests - "Nothing here needs a frame - this is the one part of the editor that was always plain logic" Those two are also the platform-sensitive ones, which is what makes the over-application worth undoing rather than accepting. SchemaFileTests does real filesystem I/O through AbsoluteFilePath and a scratch directory, and RecentFilesTests branches on OperatingSystem.IsWindows() to build the paths it asserts on - a test written to check Windows behaviour that the rename would have stopped running on Windows. So they move to Schema.Editor.Test, which no glob excludes and which therefore runs everywhere, and Schema.Editor.UITests keeps the 189 that need a frame. Schema.Editor.Test 13 tests, every platform Schema.Editor.UITests 189 tests, Linux only Both pass. The four InternalsVisibleTo declarations now name both assemblies, and the documents describe both projects. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015qxqZVzN8CJcDxTb5gtWua --- CLAUDE.md | 5 +-- README.md | 3 +- Schema.Cpp/AssemblyInfo.cs | 1 + .../RecentFilesTests.cs | 2 +- Schema.Editor.Test/Schema.Editor.Test.csproj | 34 +++++++++++++++++++ .../SchemaFileTests.cs | 2 +- Schema.Editor/AppData.cs | 1 + Schema.Tool/Program.cs | 1 + Schema.sln | 14 ++++++++ Schema/AssemblyInfo.cs | 1 + docs/README.md | 2 +- docs/development/README.md | 1 + 12 files changed, 61 insertions(+), 6 deletions(-) rename {Schema.Editor.UITests => Schema.Editor.Test}/RecentFilesTests.cs (98%) create mode 100644 Schema.Editor.Test/Schema.Editor.Test.csproj rename {Schema.Editor.UITests => Schema.Editor.Test}/SchemaFileTests.cs (99%) diff --git a/CLAUDE.md b/CLAUDE.md index 65f0601..2258c92 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,14 +4,15 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -Schema is a C# library for defining and managing data structure schemas. It consists of seven projects: +Schema is a C# library for defining and managing data structure schemas. It consists of eight projects: - **Schema** - Core library providing schema definition types (classes, enums, members, types) - **Schema.Test** - MSTest unit tests for the core library - **Schema.Cpp** - The C++ generator, in its own project because `ktsu.Coder` ships no `net8.0` - **Schema.Cpp.Test** - Its tests, including the three acceptance tests against Holotype's target document and one that compiles the generated reflection table - **Schema.Editor** - ImGui-based visual editor application for creating and editing `.schema.json` files -- **Schema.Editor.UITests** - Headless UI tests for the editor, driven through `ktsu.ImGui.App.Testing`. Named `.UITests` so the shared `dotnet.yml` runs it on Linux only, as it does every other ktsu UI suite +- **Schema.Editor.Test** - The editor's tests that need no frame: the recent-files list and reading and writing the document on disk. Ordinary unit tests, so they run on every platform - which is the point of keeping them out of the suite below, since those are the two parts of the editor whose behaviour differs by operating system +- **Schema.Editor.UITests** - The editor's tests that drive real frames through `EditorHarness`/`WidgetHarness`. Named `.UITests` so the shared `dotnet.yml` runs it on Linux only, as it does every other ktsu UI suite: the CPU rasterizer measures the same on any host, so the other platforms pay the cost without learning anything - **Schema.Tool** - The `dotnet tool` (`kschema`) that validates schemas and runs their code generators ## Build Commands diff --git a/README.md b/README.md index c2b5230..0e4967e 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,14 @@ A C# library for defining, managing, and editing data structure schemas with a r **ktsu.Schema** lets you define structured data models programmatically or visually, then serialize them to `.schema.json` files (documented in the [schema file format reference](docs/schema-format.md)). It provides a foundation for code generation, data validation, and tooling that needs to understand your data structures at a metadata level. -The solution contains seven projects: +The solution contains eight projects: - **Schema** - Core library with schema definition types, a rich type system, and JSON serialization - **Schema.Test** - Unit tests for the core library - **Schema.Cpp** - The C++ generator, published separately as [`ktsu.Schema.Cpp`](https://nuget.org/packages/ktsu.Schema.Cpp) - **Schema.Cpp.Test** - Its tests, including acceptance tests against a real target's document - **Schema.Editor** - ImGui-based desktop application for visual schema editing +- **Schema.Editor.Test** - The editor tests that need no frame: recent files, and reading and writing the document - **Schema.Editor.UITests** - Headless UI tests that drive the editor with no window or display - **Schema.Tool** - Command line entry point for validating schemas and running their code generators diff --git a/Schema.Cpp/AssemblyInfo.cs b/Schema.Cpp/AssemblyInfo.cs index 26af534..327586c 100644 --- a/Schema.Cpp/AssemblyInfo.cs +++ b/Schema.Cpp/AssemblyInfo.cs @@ -5,4 +5,5 @@ // rather than to the one that happens to need them. [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Test")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.UITests")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.Test")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Cpp.Test")] diff --git a/Schema.Editor.UITests/RecentFilesTests.cs b/Schema.Editor.Test/RecentFilesTests.cs similarity index 98% rename from Schema.Editor.UITests/RecentFilesTests.cs rename to Schema.Editor.Test/RecentFilesTests.cs index e79d825..49b00e9 100644 --- a/Schema.Editor.UITests/RecentFilesTests.cs +++ b/Schema.Editor.Test/RecentFilesTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.UITests; +namespace ktsu.Schema.Editor.Test; using System.Linq; diff --git a/Schema.Editor.Test/Schema.Editor.Test.csproj b/Schema.Editor.Test/Schema.Editor.Test.csproj new file mode 100644 index 0000000..55eff6e --- /dev/null +++ b/Schema.Editor.Test/Schema.Editor.Test.csproj @@ -0,0 +1,34 @@ + + + + + + true + + + + + + + + + + + + + + 18.8.0 + + + + + + + + net10.0 + + + diff --git a/Schema.Editor.UITests/SchemaFileTests.cs b/Schema.Editor.Test/SchemaFileTests.cs similarity index 99% rename from Schema.Editor.UITests/SchemaFileTests.cs rename to Schema.Editor.Test/SchemaFileTests.cs index 402d93b..b6e9184 100644 --- a/Schema.Editor.UITests/SchemaFileTests.cs +++ b/Schema.Editor.Test/SchemaFileTests.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023-2026 ktsu-dev contributors -namespace ktsu.Schema.Editor.UITests; +namespace ktsu.Schema.Editor.Test; using System; using System.IO; diff --git a/Schema.Editor/AppData.cs b/Schema.Editor/AppData.cs index ba8d556..f0d0a43 100644 --- a/Schema.Editor/AppData.cs +++ b/Schema.Editor/AppData.cs @@ -5,6 +5,7 @@ // projects, and there are two of them now; which of the two a given project actually needs is not // what the rule is checking. [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.UITests")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.Test")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Test")] namespace ktsu.Schema.Editor; diff --git a/Schema.Tool/Program.cs b/Schema.Tool/Program.cs index 596e1fb..3669b4f 100644 --- a/Schema.Tool/Program.cs +++ b/Schema.Tool/Program.cs @@ -6,6 +6,7 @@ // what the rule is checking. [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Test")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.UITests")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.Test")] namespace ktsu.Schema.Tool; diff --git a/Schema.sln b/Schema.sln index 31f9d7c..1a94143 100644 --- a/Schema.sln +++ b/Schema.sln @@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Cpp", "Schema.Cpp\Sc EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Cpp.Test", "Schema.Cpp.Test\Schema.Cpp.Test.csproj", "{B331523C-35C3-456A-B5DA-678A6144A090}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Editor.Test", "Schema.Editor.Test\Schema.Editor.Test.csproj", "{5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -111,6 +113,18 @@ Global {B331523C-35C3-456A-B5DA-678A6144A090}.Release|x64.Build.0 = Release|Any CPU {B331523C-35C3-456A-B5DA-678A6144A090}.Release|x86.ActiveCfg = Release|Any CPU {B331523C-35C3-456A-B5DA-678A6144A090}.Release|x86.Build.0 = Release|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Debug|x64.ActiveCfg = Debug|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Debug|x64.Build.0 = Debug|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Debug|x86.ActiveCfg = Debug|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Debug|x86.Build.0 = Debug|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Release|Any CPU.Build.0 = Release|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Release|x64.ActiveCfg = Release|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Release|x64.Build.0 = Release|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Release|x86.ActiveCfg = Release|Any CPU + {5562D744-2ECE-47B5-9AB8-EA5F659ABAE8}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Schema/AssemblyInfo.cs b/Schema/AssemblyInfo.cs index b242721..b748c3e 100644 --- a/Schema/AssemblyInfo.cs +++ b/Schema/AssemblyInfo.cs @@ -6,3 +6,4 @@ // what the rule is checking. [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Test")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.UITests")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.Schema.Editor.Test")] diff --git a/docs/README.md b/docs/README.md index 1e41b0b..06f0dce 100644 --- a/docs/README.md +++ b/docs/README.md @@ -64,7 +64,7 @@ if (SchemaSerializer.TryDeserialize(File.ReadAllText("user.schema.json"), out Sc - **[Schema](api/schema-core.md)** - Core library containing the schema definition system - **[Schema.Editor](features/schema-editor.md)** - Visual editor application - **Schema.Tool** - Command line validator and code generator runner -- **Schema.Test** / **Schema.Editor.UITests** - MSTest suites for the library and the editor (see the [development guide](development/README.md)) +- **Schema.Test** / **Schema.Editor.Test** / **Schema.Editor.UITests** - MSTest suites for the library and the editor (see the [development guide](development/README.md)) ## Documentation diff --git a/docs/development/README.md b/docs/development/README.md index c5308d0..e6b4c03 100644 --- a/docs/development/README.md +++ b/docs/development/README.md @@ -46,6 +46,7 @@ dotnet run --project Schema.Editor | `Schema/` | Core schema definition library | | `Schema.Test/` | MSTest unit tests for the library | | `Schema.Editor/` | ImGui-based visual editor | +| `Schema.Editor.Test/` | The editor tests that need no frame | | `Schema.Editor.UITests/` | Headless UI tests for the editor | | `Schema.Tool/` | Command line validator and generator | | `docs/` | Markdown documentation | From 4c05fba3622c06f5c47dafaefcfc1942810110f0 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 09:34:51 +0000 Subject: [PATCH 3/4] ci: move the UI suite under tests/ so the exclude actually matches it The rename alone did not work. macOS run 34827691047 reported: --exclude matched no projects in Schema.sln. Patterns: **/*.UITests/* Running 4 test project(s), skipping 0. and ran the 189 frame-driven tests anyway. ktsubuild's `**/` does not match zero path segments, so a project at the repository root is never excluded however it is named. Every path the shared workflow successfully excludes elsewhere has a leading directory - from ImGuiApp's macOS run on the same workflow: Excluding tests/ImGuiMarkdownDemo.UITests/ImGuiMarkdownDemo.UITests.csproj Excluding tests/ImGui.Widgets.UITests/ImGui.Widgets.UITests.csproj All 11 test project(s) passed! (7 excluded by --exclude.) So the suffix was necessary and not sufficient: the path needs both. This was the one risk I named and then checked wrongly. I tested the pattern against DotNet.Glob and Microsoft.Extensions.FileSystemGlobbing, both of which match a root-level path, and neither is what ktsubuild uses. The evidence above is from the tool itself. Schema.Editor.Test stays at the root, where nothing excludes it, which is what keeps its 13 frameless tests running on every platform. Verified: solution builds clean, 189/189 from the new location. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015qxqZVzN8CJcDxTb5gtWua --- CLAUDE.md | 6 +++--- README.md | 2 +- Schema.sln | 2 +- docs/ROADMAP.md | 4 ++-- docs/development/README.md | 4 ++-- .../Schema.Editor.UITests}/AssemblyInfo.cs | 0 .../Schema.Editor.UITests}/ClassGraphTests.cs | 0 .../Schema.Editor.UITests}/CodeGeneratorPanelTests.cs | 0 .../Schema.Editor.UITests}/DiagnosticsPanelTests.cs | 0 .../Schema.Editor.UITests}/DiagnosticsTests.cs | 0 .../Schema.Editor.UITests}/DocumentGuardTests.cs | 0 .../Schema.Editor.UITests}/EditFieldTests.cs | 0 .../Schema.Editor.UITests}/EditorHarness.cs | 0 .../Schema.Editor.UITests}/ElementPanelTests.cs | 0 .../Schema.Editor.UITests}/FileBrowserTests.cs | 0 .../Schema.Editor.UITests}/HarnessSmokeTests.cs | 0 .../Schema.Editor.UITests}/MemberPanelTests.cs | 0 .../Schema.Editor.UITests}/MemberSemanticsTests.cs | 0 .../Schema.Editor.UITests}/MenuTests.cs | 0 .../Schema.Editor.UITests}/Schema.Editor.UITests.csproj | 2 +- .../Schema.Editor.UITests}/ShortcutTests.cs | 0 .../Schema.Editor.UITests}/ThemeBrowserTests.cs | 0 .../Schema.Editor.UITests}/ThemeTests.cs | 0 .../Schema.Editor.UITests}/TreeContextMenuTests.cs | 0 .../Schema.Editor.UITests}/TreeEditingTests.cs | 0 .../Schema.Editor.UITests}/TreeNavigationTests.cs | 0 .../Schema.Editor.UITests}/TreeRowWidthTests.cs | 0 .../Schema.Editor.UITests}/ValidationMarkingTests.cs | 0 .../Schema.Editor.UITests}/WidgetHarness.cs | 0 29 files changed, 10 insertions(+), 10 deletions(-) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/AssemblyInfo.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/ClassGraphTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/CodeGeneratorPanelTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/DiagnosticsPanelTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/DiagnosticsTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/DocumentGuardTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/EditFieldTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/EditorHarness.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/ElementPanelTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/FileBrowserTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/HarnessSmokeTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/MemberPanelTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/MemberSemanticsTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/MenuTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/Schema.Editor.UITests.csproj (94%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/ShortcutTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/ThemeBrowserTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/ThemeTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/TreeContextMenuTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/TreeEditingTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/TreeNavigationTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/TreeRowWidthTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/ValidationMarkingTests.cs (100%) rename {Schema.Editor.UITests => tests/Schema.Editor.UITests}/WidgetHarness.cs (100%) diff --git a/CLAUDE.md b/CLAUDE.md index 2258c92..96dab05 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,7 @@ Schema is a C# library for defining and managing data structure schemas. It cons - **Schema.Cpp.Test** - Its tests, including the three acceptance tests against Holotype's target document and one that compiles the generated reflection table - **Schema.Editor** - ImGui-based visual editor application for creating and editing `.schema.json` files - **Schema.Editor.Test** - The editor's tests that need no frame: the recent-files list and reading and writing the document on disk. Ordinary unit tests, so they run on every platform - which is the point of keeping them out of the suite below, since those are the two parts of the editor whose behaviour differs by operating system -- **Schema.Editor.UITests** - The editor's tests that drive real frames through `EditorHarness`/`WidgetHarness`. Named `.UITests` so the shared `dotnet.yml` runs it on Linux only, as it does every other ktsu UI suite: the CPU rasterizer measures the same on any host, so the other platforms pay the cost without learning anything +- **tests/Schema.Editor.UITests** - The editor's tests that drive real frames through `EditorHarness`/`WidgetHarness`. The shared `dotnet.yml` runs it on Linux only, as it does every other ktsu UI suite: the CPU rasterizer measures the same on any host, so the other platforms pay the cost without learning anything. **Both halves of the path are load-bearing** - `ktsubuild --exclude "**/*.UITests/*"` needs the `.UITests` suffix *and* a leading directory, because its `**/` does not match zero segments. A project at the repository root is never excluded, however it is named - **Schema.Tool** - The `dotnet tool` (`kschema`) that validates schemas and runs their code generators ## Build Commands @@ -520,8 +520,8 @@ as the property initialiser as well, so a generated instance starts at it. - `Schema.Editor/EditorHost.cs` - Builds the `ImGuiAppConfig`; `CreateConfig` is what the tests drive too - `Schema.Editor/EditorTheme.cs` - The ktsu.ThemeProvider theme, and the one definition of how a validation issue is coloured - `Schema.Editor/Program.cs` - The entry point, and the only file excluded from coverage measurement -- `Schema.Editor.UITests/EditorHarness.cs` - Runs a real editor headlessly, frames advanced by the test -- `Schema.Editor.UITests/WidgetHarness.cs` - A headless frame containing only the widget under test, and an editor for a panel that is one +- `tests/Schema.Editor.UITests/EditorHarness.cs` - Runs a real editor headlessly, frames advanced by the test +- `tests/Schema.Editor.UITests/WidgetHarness.cs` - A headless frame containing only the widget under test, and an editor for a panel that is one ### Addressing the editor from a test diff --git a/README.md b/README.md index 0e4967e..ee62bcf 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The solution contains eight projects: - **Schema.Cpp.Test** - Its tests, including acceptance tests against a real target's document - **Schema.Editor** - ImGui-based desktop application for visual schema editing - **Schema.Editor.Test** - The editor tests that need no frame: recent files, and reading and writing the document -- **Schema.Editor.UITests** - Headless UI tests that drive the editor with no window or display +- **tests/Schema.Editor.UITests** - Headless UI tests that drive the editor with no window or display - **Schema.Tool** - Command line entry point for validating schemas and running their code generators `Schema.Cpp` is a separate package rather than part of the library because the AST it builds on diff --git a/Schema.sln b/Schema.sln index 1a94143..8f1a2db 100644 --- a/Schema.sln +++ b/Schema.sln @@ -11,7 +11,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Editor", "Schema.Edi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Tool", "Schema.Tool\Schema.Tool.csproj", "{1EBD8E07-A2A3-4091-8748-ECFEB1D301F0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Editor.UITests", "Schema.Editor.UITests\Schema.Editor.UITests.csproj", "{31DEE39F-3542-4B65-B744-74243D28D878}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Editor.UITests", "tests\Schema.Editor.UITests\Schema.Editor.UITests.csproj", "{31DEE39F-3542-4B65-B744-74243D28D878}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Schema.Cpp", "Schema.Cpp\Schema.Cpp.csproj", "{93D1BF5F-D2C4-46C4-A783-2F6F4B7AA6B7}" EndProject diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 5b5e91f..74e0134 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -38,7 +38,7 @@ time. For what the library actually does, the tests in recent-files list. - **CLI** — `Schema.Tool` validates a schema or runs its code generators, exiting non-zero on errors so it can gate a build. -- **Editor tests** — `Schema.Editor.UITests` drives the editor headlessly through +- **Editor tests** — `tests/Schema.Editor.UITests` drives the editor headlessly through `ktsu.ImGui.App.Testing`, which rasterizes in software and injects input straight into ImGui, so the editor's real draw code runs on a continuous integration runner with no window or display. - **CI/CD** — GitHub Actions with build, multi-framework test, SonarCloud analysis, CodeQL, NuGet @@ -103,7 +103,7 @@ Outstanding: editor packaging via winget, and cutting the v2.0 milestone. Not one of the original phases; added when the editor grew large enough to need one. -`Schema.Editor.UITests` ([#128](https://github.com/ktsu-dev/Schema/issues/128)) drives the editor +`tests/Schema.Editor.UITests` ([#128](https://github.com/ktsu-dev/Schema/issues/128)) drives the editor headlessly. It covers the recent-files list, the commit-once text field, the unsaved-changes guard and the save-then-continue sequence, validation debouncing and click-to-navigate, and — by addressing widgets through the names the editor marks them with — the schema tree, its context diff --git a/docs/development/README.md b/docs/development/README.md index e6b4c03..de58d42 100644 --- a/docs/development/README.md +++ b/docs/development/README.md @@ -47,7 +47,7 @@ dotnet run --project Schema.Editor | `Schema.Test/` | MSTest unit tests for the library | | `Schema.Editor/` | ImGui-based visual editor | | `Schema.Editor.Test/` | The editor tests that need no frame | -| `Schema.Editor.UITests/` | Headless UI tests for the editor | +| `tests/Schema.Editor.UITests/` | Headless UI tests for the editor | | `Schema.Tool/` | Command line validator and generator | | `docs/` | Markdown documentation | | `scripts/` | Build automation (PSBuild) | @@ -70,7 +70,7 @@ Plain unit tests over the core library, run against every framework it publishes suites (`SchemaTests`, `SchemaClassTests`, `SchemaEnumTests`, `TypeSystemTests`, `SchemaSerializerTests`, `AddClassFromTypeTests`) show the conventions in use. -### The editor — `Schema.Editor.UITests` +### The editor — `tests/Schema.Editor.UITests` The editor's code is immediate-mode draw calls, so none of it executes without a live ImGui context. `ktsu.ImGui.App.Testing` supplies one with no window, no display and no GPU: it rasterizes diff --git a/Schema.Editor.UITests/AssemblyInfo.cs b/tests/Schema.Editor.UITests/AssemblyInfo.cs similarity index 100% rename from Schema.Editor.UITests/AssemblyInfo.cs rename to tests/Schema.Editor.UITests/AssemblyInfo.cs diff --git a/Schema.Editor.UITests/ClassGraphTests.cs b/tests/Schema.Editor.UITests/ClassGraphTests.cs similarity index 100% rename from Schema.Editor.UITests/ClassGraphTests.cs rename to tests/Schema.Editor.UITests/ClassGraphTests.cs diff --git a/Schema.Editor.UITests/CodeGeneratorPanelTests.cs b/tests/Schema.Editor.UITests/CodeGeneratorPanelTests.cs similarity index 100% rename from Schema.Editor.UITests/CodeGeneratorPanelTests.cs rename to tests/Schema.Editor.UITests/CodeGeneratorPanelTests.cs diff --git a/Schema.Editor.UITests/DiagnosticsPanelTests.cs b/tests/Schema.Editor.UITests/DiagnosticsPanelTests.cs similarity index 100% rename from Schema.Editor.UITests/DiagnosticsPanelTests.cs rename to tests/Schema.Editor.UITests/DiagnosticsPanelTests.cs diff --git a/Schema.Editor.UITests/DiagnosticsTests.cs b/tests/Schema.Editor.UITests/DiagnosticsTests.cs similarity index 100% rename from Schema.Editor.UITests/DiagnosticsTests.cs rename to tests/Schema.Editor.UITests/DiagnosticsTests.cs diff --git a/Schema.Editor.UITests/DocumentGuardTests.cs b/tests/Schema.Editor.UITests/DocumentGuardTests.cs similarity index 100% rename from Schema.Editor.UITests/DocumentGuardTests.cs rename to tests/Schema.Editor.UITests/DocumentGuardTests.cs diff --git a/Schema.Editor.UITests/EditFieldTests.cs b/tests/Schema.Editor.UITests/EditFieldTests.cs similarity index 100% rename from Schema.Editor.UITests/EditFieldTests.cs rename to tests/Schema.Editor.UITests/EditFieldTests.cs diff --git a/Schema.Editor.UITests/EditorHarness.cs b/tests/Schema.Editor.UITests/EditorHarness.cs similarity index 100% rename from Schema.Editor.UITests/EditorHarness.cs rename to tests/Schema.Editor.UITests/EditorHarness.cs diff --git a/Schema.Editor.UITests/ElementPanelTests.cs b/tests/Schema.Editor.UITests/ElementPanelTests.cs similarity index 100% rename from Schema.Editor.UITests/ElementPanelTests.cs rename to tests/Schema.Editor.UITests/ElementPanelTests.cs diff --git a/Schema.Editor.UITests/FileBrowserTests.cs b/tests/Schema.Editor.UITests/FileBrowserTests.cs similarity index 100% rename from Schema.Editor.UITests/FileBrowserTests.cs rename to tests/Schema.Editor.UITests/FileBrowserTests.cs diff --git a/Schema.Editor.UITests/HarnessSmokeTests.cs b/tests/Schema.Editor.UITests/HarnessSmokeTests.cs similarity index 100% rename from Schema.Editor.UITests/HarnessSmokeTests.cs rename to tests/Schema.Editor.UITests/HarnessSmokeTests.cs diff --git a/Schema.Editor.UITests/MemberPanelTests.cs b/tests/Schema.Editor.UITests/MemberPanelTests.cs similarity index 100% rename from Schema.Editor.UITests/MemberPanelTests.cs rename to tests/Schema.Editor.UITests/MemberPanelTests.cs diff --git a/Schema.Editor.UITests/MemberSemanticsTests.cs b/tests/Schema.Editor.UITests/MemberSemanticsTests.cs similarity index 100% rename from Schema.Editor.UITests/MemberSemanticsTests.cs rename to tests/Schema.Editor.UITests/MemberSemanticsTests.cs diff --git a/Schema.Editor.UITests/MenuTests.cs b/tests/Schema.Editor.UITests/MenuTests.cs similarity index 100% rename from Schema.Editor.UITests/MenuTests.cs rename to tests/Schema.Editor.UITests/MenuTests.cs diff --git a/Schema.Editor.UITests/Schema.Editor.UITests.csproj b/tests/Schema.Editor.UITests/Schema.Editor.UITests.csproj similarity index 94% rename from Schema.Editor.UITests/Schema.Editor.UITests.csproj rename to tests/Schema.Editor.UITests/Schema.Editor.UITests.csproj index 1f6ef83..3d2bab3 100644 --- a/Schema.Editor.UITests/Schema.Editor.UITests.csproj +++ b/tests/Schema.Editor.UITests/Schema.Editor.UITests.csproj @@ -7,7 +7,7 @@ - + diff --git a/Schema.Editor.UITests/ShortcutTests.cs b/tests/Schema.Editor.UITests/ShortcutTests.cs similarity index 100% rename from Schema.Editor.UITests/ShortcutTests.cs rename to tests/Schema.Editor.UITests/ShortcutTests.cs diff --git a/Schema.Editor.UITests/ThemeBrowserTests.cs b/tests/Schema.Editor.UITests/ThemeBrowserTests.cs similarity index 100% rename from Schema.Editor.UITests/ThemeBrowserTests.cs rename to tests/Schema.Editor.UITests/ThemeBrowserTests.cs diff --git a/Schema.Editor.UITests/ThemeTests.cs b/tests/Schema.Editor.UITests/ThemeTests.cs similarity index 100% rename from Schema.Editor.UITests/ThemeTests.cs rename to tests/Schema.Editor.UITests/ThemeTests.cs diff --git a/Schema.Editor.UITests/TreeContextMenuTests.cs b/tests/Schema.Editor.UITests/TreeContextMenuTests.cs similarity index 100% rename from Schema.Editor.UITests/TreeContextMenuTests.cs rename to tests/Schema.Editor.UITests/TreeContextMenuTests.cs diff --git a/Schema.Editor.UITests/TreeEditingTests.cs b/tests/Schema.Editor.UITests/TreeEditingTests.cs similarity index 100% rename from Schema.Editor.UITests/TreeEditingTests.cs rename to tests/Schema.Editor.UITests/TreeEditingTests.cs diff --git a/Schema.Editor.UITests/TreeNavigationTests.cs b/tests/Schema.Editor.UITests/TreeNavigationTests.cs similarity index 100% rename from Schema.Editor.UITests/TreeNavigationTests.cs rename to tests/Schema.Editor.UITests/TreeNavigationTests.cs diff --git a/Schema.Editor.UITests/TreeRowWidthTests.cs b/tests/Schema.Editor.UITests/TreeRowWidthTests.cs similarity index 100% rename from Schema.Editor.UITests/TreeRowWidthTests.cs rename to tests/Schema.Editor.UITests/TreeRowWidthTests.cs diff --git a/Schema.Editor.UITests/ValidationMarkingTests.cs b/tests/Schema.Editor.UITests/ValidationMarkingTests.cs similarity index 100% rename from Schema.Editor.UITests/ValidationMarkingTests.cs rename to tests/Schema.Editor.UITests/ValidationMarkingTests.cs diff --git a/Schema.Editor.UITests/WidgetHarness.cs b/tests/Schema.Editor.UITests/WidgetHarness.cs similarity index 100% rename from Schema.Editor.UITests/WidgetHarness.cs rename to tests/Schema.Editor.UITests/WidgetHarness.cs From 9c95f52f9fe04f4d2b83243025e710e0d672a596 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 09:38:23 +0000 Subject: [PATCH 4/4] fix: port the generator fix from #191 The exclusion works now - macOS run 34828747684 reported: Excluding tests/Schema.Editor.UITests/Schema.Editor.UITests.csproj from the test run. Schema.Editor.Test passed there, so the thirteen frameless tests still run on macOS, and Schema.Test passed on all three frameworks. The only failures left on that cell are Schema.Cpp.Test on net9.0 and net10.0, which is #191's fix and not this branch's work. Rather than wait for #191 to merge, its change is ported here so this PR can go green on its own. It is copied verbatim - same placement, same comment - so the two are byte-identical and merge without a conflict: the post-image blob is 6d74192 on both sides. Once #191 lands this commit is a no-op. Schema.Cpp.Test: 101/101. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015qxqZVzN8CJcDxTb5gtWua --- Schema.Cpp.Test/ExemplarSemanticTypeTests.cs | 1 + Schema.Cpp/CppFileBuilder.cs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Schema.Cpp.Test/ExemplarSemanticTypeTests.cs b/Schema.Cpp.Test/ExemplarSemanticTypeTests.cs index 26a9bf9..d3c676e 100644 --- a/Schema.Cpp.Test/ExemplarSemanticTypeTests.cs +++ b/Schema.Cpp.Test/ExemplarSemanticTypeTests.cs @@ -55,6 +55,7 @@ public sealed class ExemplarSemanticTypeTests #pragma once + #include #include #include diff --git a/Schema.Cpp/CppFileBuilder.cs b/Schema.Cpp/CppFileBuilder.cs index f333f0d..6d74192 100644 --- a/Schema.Cpp/CppFileBuilder.cs +++ b/Schema.Cpp/CppFileBuilder.cs @@ -147,6 +147,13 @@ public SourceFile SemanticType(SchemaSemanticType semanticType) } declaration.Members.Add(Comparison(name, "==", "bool")); + + // A defaulted <=> answers with one of the ordering types, and those live in . + // libstdc++ happens to have declared them by the time this header is read and libc++ does + // not, so without this the generated type compiles under GCC and is refused by Clang - + // which is exactly the kind of difference a generator must not leave to whoever includes + // it. + mapper.Require(""); declaration.Members.Add(Comparison(name, "<=>", "auto")); declaration.Members.Add(new FieldDeclaration(ValueField, UnderlyingAlias) { Visibility = Visibility.Private });