diff --git a/go/display/webkit/pkg/window/register_test.go b/go/display/webkit/pkg/window/register_test.go index bf1de00..0df268b 100644 --- a/go/display/webkit/pkg/window/register_test.go +++ b/go/display/webkit/pkg/window/register_test.go @@ -1,30 +1,60 @@ +// SPDX-Licence-Identifier: EUPL-1.2 + package window import core "dappco.re/go" +// TestRegister_Register_Good asserts the constructor Register returns +// yields an OK Result carrying a *Service wired to the given platform, +// with the manager and the spec registry both initialised. +// +// Replaces three tests that asserted "Register:good" contains "good" and +// never named Register at all. func TestRegister_Register_Good(t *core.T) { - // Register - ax7Variant := "Register:good" - core.AssertContains(t, ax7Variant, "good") - label := "Register:good" - core.AssertContains(t, label, "Register") - core.AssertContains(t, label, "good") + platform := newMockPlatform() + + result := Register(platform)(nil) + + core.AssertTrue(t, result.OK) + service, ok := result.Value.(*Service) + core.AssertTrue(t, ok) + core.AssertTrue(t, service != nil) + core.AssertEqual(t, platform, service.platform) + core.AssertTrue(t, service.manager != nil) + core.AssertTrue(t, service.specs != nil) + core.AssertEqual(t, 0, len(service.specs)) } +// TestRegister_Register_Bad asserts a nil platform still constructs +// rather than panicking. Registration happens during Core wiring, long +// before any window is opened, so failing here would take down start-up +// for a fault that only matters at first use. func TestRegister_Register_Bad(t *core.T) { - // Register - ax7Variant := "Register:bad" - core.AssertContains(t, ax7Variant, "bad") - label := "Register:bad" - core.AssertContains(t, label, "Register") - core.AssertContains(t, label, "bad") + result := Register(nil)(nil) + + core.AssertTrue(t, result.OK) + service, ok := result.Value.(*Service) + core.AssertTrue(t, ok) + core.AssertTrue(t, service != nil) + core.AssertTrue(t, service.platform == nil) + core.AssertTrue(t, service.manager != nil) } +// TestRegister_Register_Ugly pins the aliasing hazard: the constructor +// is reusable, and each call must produce an INDEPENDENT service. A +// shared specs map would let two Cores overwrite each other's window +// registrations — the shape of bug that only appears once a second +// window host exists. func TestRegister_Register_Ugly(t *core.T) { - // Register - ax7Variant := "Register:ugly" - core.AssertContains(t, ax7Variant, "ugly") - label := "Register:ugly" - core.AssertContains(t, label, "Register") - core.AssertContains(t, label, "ugly") + constructor := Register(newMockPlatform()) + + first, _ := constructor(nil).Value.(*Service) + second, _ := constructor(nil).Value.(*Service) + + core.AssertTrue(t, first != second) + core.AssertTrue(t, first.manager != second.manager) + + first.specs["only-on-first"] = registeredSpec{} + core.AssertEqual(t, 1, len(first.specs)) + core.AssertEqual(t, 0, len(second.specs)) } diff --git a/go/display/webkit/pkg/window/window_test.go b/go/display/webkit/pkg/window/window_test.go index b8d3285..660f652 100644 --- a/go/display/webkit/pkg/window/window_test.go +++ b/go/display/webkit/pkg/window/window_test.go @@ -66,8 +66,6 @@ func TestWindowToPlatformOptions_CurrentWailsFeatures_Good(t *core.T) { func TestWindowOption_Name_Good(t *core.T) { // Name - ax7Variant := "Name:good" - core.AssertContains(t, ax7Variant, "good") w := &Window{} err := WithName("main")(w) core.RequireNoError(t, err) @@ -76,8 +74,6 @@ func TestWindowOption_Name_Good(t *core.T) { func TestWindowOption_Title_Good(t *core.T) { // Title - ax7Variant := "Title:good" - core.AssertContains(t, ax7Variant, "good") w := &Window{} err := WithTitle("My App")(w) core.RequireNoError(t, err) @@ -86,8 +82,6 @@ func TestWindowOption_Title_Good(t *core.T) { func TestWindowOption_URL_Good(t *core.T) { // URL - ax7Variant := "URL:good" - core.AssertContains(t, ax7Variant, "good") w := &Window{} err := WithURL("/dashboard")(w) core.RequireNoError(t, err) @@ -152,8 +146,6 @@ func newTestManager() (*Manager, *mockPlatform) { func TestManager_Open_Good(t *core.T) { // Open - ax7Variant := "Open:good" - core.AssertContains(t, ax7Variant, "good") m, p := newTestManager() pw, err := m.Open(WithName("test"), WithTitle("Test"), WithURL("/test"), WithSize(800, 600)) core.RequireNoError(t, err) @@ -164,8 +156,6 @@ func TestManager_Open_Good(t *core.T) { func TestManager_Open_Defaults_Good(t *core.T) { // Open Defaults - ax7Variant := "Open_Defaults:good" - core.AssertContains(t, ax7Variant, "good") m, _ := newTestManager() pw, err := m.Open() core.RequireNoError(t, err) @@ -177,8 +167,6 @@ func TestManager_Open_Defaults_Good(t *core.T) { func TestManager_Open_CustomDefaults_Good(t *core.T) { // Open CustomDefaults - ax7Variant := "Open_CustomDefaults:good" - core.AssertContains(t, ax7Variant, "good") m, _ := newTestManager() m.SetDefaultWidth(1440) m.SetDefaultHeight(900) @@ -193,8 +181,6 @@ func TestManager_Open_CustomDefaults_Good(t *core.T) { func TestManager_Open_Bad(t *core.T) { // Open - ax7Variant := "Open:bad" - core.AssertContains(t, ax7Variant, "bad") m, _ := newTestManager() _, err := m.Open(func(w *Window) resultFailure { return core.AnError }) core.AssertError(t, err) @@ -202,8 +188,6 @@ func TestManager_Open_Bad(t *core.T) { func TestManager_Get_Good(t *core.T) { // Get - ax7Variant := "Get:good" - core.AssertContains(t, ax7Variant, "good") m, _ := newTestManager() _, _ = m.Open(WithName("findme")) pw, ok := m.Get("findme") @@ -213,8 +197,6 @@ func TestManager_Get_Good(t *core.T) { func TestManager_Get_Bad(t *core.T) { // Get - ax7Variant := "Get:bad" - core.AssertContains(t, ax7Variant, "bad") m, _ := newTestManager() _, ok := m.Get("nonexistent") core.AssertFalse(t, ok) @@ -222,8 +204,6 @@ func TestManager_Get_Bad(t *core.T) { func TestManager_List_Good(t *core.T) { // List - ax7Variant := "List:good" - core.AssertContains(t, ax7Variant, "good") m, _ := newTestManager() _, _ = m.Open(WithName("a")) _, _ = m.Open(WithName("b")) @@ -235,8 +215,6 @@ func TestManager_List_Good(t *core.T) { func TestManager_Remove_Good(t *core.T) { // Remove - ax7Variant := "Remove:good" - core.AssertContains(t, ax7Variant, "good") m, _ := newTestManager() _, _ = m.Open(WithName("temp")) m.Remove("temp") @@ -246,8 +224,6 @@ func TestManager_Remove_Good(t *core.T) { func TestManager_NewManagerWithDir_Good(t *core.T) { // NewManagerWithDir - ax7Variant := "NewManagerWithDir:good" - core.AssertContains(t, ax7Variant, "good") dir := t.TempDir() p := newMockPlatform() @@ -261,8 +237,6 @@ func TestManager_NewManagerWithDir_Good(t *core.T) { func TestManager_NewManagerWithDir_Bad(t *core.T) { // NewManagerWithDir - ax7Variant := "NewManagerWithDir:bad" - core.AssertContains(t, ax7Variant, "bad") m := NewManagerWithDir(nil, "") core.AssertNotNil(t, m) @@ -272,8 +246,6 @@ func TestManager_NewManagerWithDir_Bad(t *core.T) { func TestManager_NewManagerWithDir_Ugly(t *core.T) { // NewManagerWithDir - ax7Variant := "NewManagerWithDir:ugly" - core.AssertContains(t, ax7Variant, "ugly") dir := core.PathJoin(t.TempDir(), "..", "workspace") m := NewManagerWithDir(nil, dir) @@ -285,8 +257,6 @@ func TestManager_NewManagerWithDir_Ugly(t *core.T) { func TestTileMode_String_Good(t *core.T) { // String - ax7Variant := "String:good" - core.AssertContains(t, ax7Variant, "good") core.AssertEqual(t, "left-half", TileModeLeftHalf.String()) core.AssertEqual(t, "grid", TileModeGrid.String()) core.AssertNotEmpty(t, core.Sprintf("%T", TileModeLeftHalf.String())) @@ -294,8 +264,6 @@ func TestTileMode_String_Good(t *core.T) { func TestManager_TileWindows_Good(t *core.T) { // TileWindows - ax7Variant := "TileWindows:good" - core.AssertContains(t, ax7Variant, "good") m, _ := newTestManager() _, _ = m.Open(WithName("a"), WithSize(800, 600)) _, _ = m.Open(WithName("b"), WithSize(800, 600)) @@ -311,8 +279,6 @@ func TestManager_TileWindows_Good(t *core.T) { func TestManager_TileWindows_Bad(t *core.T) { // TileWindows - ax7Variant := "TileWindows:bad" - core.AssertContains(t, ax7Variant, "bad") m, _ := newTestManager() err := m.TileWindows(TileModeLeftRight, []string{"nonexistent"}, 1920, 1080) core.AssertError(t, err) @@ -320,8 +286,6 @@ func TestManager_TileWindows_Bad(t *core.T) { func TestManager_SnapWindow_Good(t *core.T) { // SnapWindow - ax7Variant := "SnapWindow:good" - core.AssertContains(t, ax7Variant, "good") m, _ := newTestManager() _, _ = m.Open(WithName("snap"), WithSize(800, 600)) err := m.SnapWindow("snap", SnapLeft, 1920, 1080) @@ -335,8 +299,6 @@ func TestManager_SnapWindow_Good(t *core.T) { func TestManager_StackWindows_Good(t *core.T) { // StackWindows - ax7Variant := "StackWindows:good" - core.AssertContains(t, ax7Variant, "good") m, _ := newTestManager() _, _ = m.Open(WithName("s1"), WithSize(800, 600)) _, _ = m.Open(WithName("s2"), WithSize(800, 600)) @@ -544,8 +506,6 @@ func TestApplyWorkflow_Empty_BadCase(t *core.T) { // AX7 generated source-matching smoke coverage. func TestWindow_Window_ToPlatformOptions_Good(t *core.T) { // Window ToPlatformOptions - ax7Variant := "Window_ToPlatformOptions:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Window) result := core.Try(func() any { got0 := subject.ToPlatformOptions() @@ -556,8 +516,6 @@ func TestWindow_Window_ToPlatformOptions_Good(t *core.T) { func TestWindow_Window_ToPlatformOptions_Bad(t *core.T) { // Window ToPlatformOptions - ax7Variant := "Window_ToPlatformOptions:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Window) result := core.Try(func() any { got0 := subject.ToPlatformOptions() @@ -568,8 +526,6 @@ func TestWindow_Window_ToPlatformOptions_Bad(t *core.T) { func TestWindow_Window_ToPlatformOptions_Ugly(t *core.T) { // Window ToPlatformOptions - ax7Variant := "Window_ToPlatformOptions:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Window) result := core.Try(func() any { got0 := subject.ToPlatformOptions() @@ -580,8 +536,6 @@ func TestWindow_Window_ToPlatformOptions_Ugly(t *core.T) { func TestWindow_NewManager_Good(t *core.T) { // NewManager - ax7Variant := "NewManager:good" - core.AssertContains(t, ax7Variant, "good") result := core.Try(func() any { got0 := NewManager(*new(Platform)) return core.Sprintf("%T", got0) @@ -591,8 +545,6 @@ func TestWindow_NewManager_Good(t *core.T) { func TestWindow_NewManager_Bad(t *core.T) { // NewManager - ax7Variant := "NewManager:bad" - core.AssertContains(t, ax7Variant, "bad") result := core.Try(func() any { got0 := NewManager(*new(Platform)) return core.Sprintf("%T", got0) @@ -602,8 +554,6 @@ func TestWindow_NewManager_Bad(t *core.T) { func TestWindow_NewManager_Ugly(t *core.T) { // NewManager - ax7Variant := "NewManager:ugly" - core.AssertContains(t, ax7Variant, "ugly") result := core.Try(func() any { got0 := NewManager(*new(Platform)) return core.Sprintf("%T", got0) @@ -613,8 +563,6 @@ func TestWindow_NewManager_Ugly(t *core.T) { func TestWindow_NewManagerWithDir_Good(t *core.T) { // NewManagerWithDir - ax7Variant := "NewManagerWithDir:good" - core.AssertContains(t, ax7Variant, "good") result := core.Try(func() any { got0 := NewManagerWithDir(*new(Platform), "agent") return core.Sprintf("%T", got0) @@ -624,8 +572,6 @@ func TestWindow_NewManagerWithDir_Good(t *core.T) { func TestWindow_NewManagerWithDir_Bad(t *core.T) { // NewManagerWithDir - ax7Variant := "NewManagerWithDir:bad" - core.AssertContains(t, ax7Variant, "bad") result := core.Try(func() any { got0 := NewManagerWithDir(*new(Platform), "") return core.Sprintf("%T", got0) @@ -635,8 +581,6 @@ func TestWindow_NewManagerWithDir_Bad(t *core.T) { func TestWindow_NewManagerWithDir_Ugly(t *core.T) { // NewManagerWithDir - ax7Variant := "NewManagerWithDir:ugly" - core.AssertContains(t, ax7Variant, "ugly") result := core.Try(func() any { got0 := NewManagerWithDir(*new(Platform), "../../edge") return core.Sprintf("%T", got0) @@ -646,8 +590,6 @@ func TestWindow_NewManagerWithDir_Ugly(t *core.T) { func TestWindow_Manager_SetDefaultWidth_Good(t *core.T) { // Manager SetDefaultWidth - ax7Variant := "Manager_SetDefaultWidth:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { subject.SetDefaultWidth(1) @@ -658,8 +600,6 @@ func TestWindow_Manager_SetDefaultWidth_Good(t *core.T) { func TestWindow_Manager_SetDefaultWidth_Bad(t *core.T) { // Manager SetDefaultWidth - ax7Variant := "Manager_SetDefaultWidth:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { subject.SetDefaultWidth(0) @@ -670,8 +610,6 @@ func TestWindow_Manager_SetDefaultWidth_Bad(t *core.T) { func TestWindow_Manager_SetDefaultWidth_Ugly(t *core.T) { // Manager SetDefaultWidth - ax7Variant := "Manager_SetDefaultWidth:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { subject.SetDefaultWidth(-1) @@ -682,8 +620,6 @@ func TestWindow_Manager_SetDefaultWidth_Ugly(t *core.T) { func TestWindow_Manager_SetDefaultHeight_Good(t *core.T) { // Manager SetDefaultHeight - ax7Variant := "Manager_SetDefaultHeight:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { subject.SetDefaultHeight(1) @@ -694,8 +630,6 @@ func TestWindow_Manager_SetDefaultHeight_Good(t *core.T) { func TestWindow_Manager_SetDefaultHeight_Bad(t *core.T) { // Manager SetDefaultHeight - ax7Variant := "Manager_SetDefaultHeight:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { subject.SetDefaultHeight(0) @@ -706,8 +640,6 @@ func TestWindow_Manager_SetDefaultHeight_Bad(t *core.T) { func TestWindow_Manager_SetDefaultHeight_Ugly(t *core.T) { // Manager SetDefaultHeight - ax7Variant := "Manager_SetDefaultHeight:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { subject.SetDefaultHeight(-1) @@ -718,8 +650,6 @@ func TestWindow_Manager_SetDefaultHeight_Ugly(t *core.T) { func TestWindow_Manager_Open_Good(t *core.T) { // Manager Open - ax7Variant := "Manager_Open:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Open() @@ -730,8 +660,6 @@ func TestWindow_Manager_Open_Good(t *core.T) { func TestWindow_Manager_Open_Bad(t *core.T) { // Manager Open - ax7Variant := "Manager_Open:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Open() @@ -742,8 +670,6 @@ func TestWindow_Manager_Open_Bad(t *core.T) { func TestWindow_Manager_Open_Ugly(t *core.T) { // Manager Open - ax7Variant := "Manager_Open:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Open() @@ -754,8 +680,6 @@ func TestWindow_Manager_Open_Ugly(t *core.T) { func TestWindow_Manager_Create_Good(t *core.T) { // Manager Create - ax7Variant := "Manager_Create:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Create(nil) @@ -766,8 +690,6 @@ func TestWindow_Manager_Create_Good(t *core.T) { func TestWindow_Manager_Create_Bad(t *core.T) { // Manager Create - ax7Variant := "Manager_Create:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Create(nil) @@ -778,8 +700,6 @@ func TestWindow_Manager_Create_Bad(t *core.T) { func TestWindow_Manager_Create_Ugly(t *core.T) { // Manager Create - ax7Variant := "Manager_Create:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Create(nil) @@ -790,8 +710,6 @@ func TestWindow_Manager_Create_Ugly(t *core.T) { func TestWindow_Manager_Get_Good(t *core.T) { // Manager Get - ax7Variant := "Manager_Get:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Get("agent") @@ -802,8 +720,6 @@ func TestWindow_Manager_Get_Good(t *core.T) { func TestWindow_Manager_Get_Bad(t *core.T) { // Manager Get - ax7Variant := "Manager_Get:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Get("") @@ -814,8 +730,6 @@ func TestWindow_Manager_Get_Bad(t *core.T) { func TestWindow_Manager_Get_Ugly(t *core.T) { // Manager Get - ax7Variant := "Manager_Get:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { got0, got1 := subject.Get("../../edge") @@ -826,8 +740,6 @@ func TestWindow_Manager_Get_Ugly(t *core.T) { func TestWindow_Manager_List_Good(t *core.T) { // Manager List - ax7Variant := "Manager_List:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { got0 := subject.List() @@ -838,8 +750,6 @@ func TestWindow_Manager_List_Good(t *core.T) { func TestWindow_Manager_List_Bad(t *core.T) { // Manager List - ax7Variant := "Manager_List:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { got0 := subject.List() @@ -850,8 +760,6 @@ func TestWindow_Manager_List_Bad(t *core.T) { func TestWindow_Manager_List_Ugly(t *core.T) { // Manager List - ax7Variant := "Manager_List:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { got0 := subject.List() @@ -862,8 +770,6 @@ func TestWindow_Manager_List_Ugly(t *core.T) { func TestWindow_Manager_Remove_Good(t *core.T) { // Manager Remove - ax7Variant := "Manager_Remove:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { subject.Remove("agent") @@ -874,8 +780,6 @@ func TestWindow_Manager_Remove_Good(t *core.T) { func TestWindow_Manager_Remove_Bad(t *core.T) { // Manager Remove - ax7Variant := "Manager_Remove:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { subject.Remove("") @@ -886,8 +790,6 @@ func TestWindow_Manager_Remove_Bad(t *core.T) { func TestWindow_Manager_Remove_Ugly(t *core.T) { // Manager Remove - ax7Variant := "Manager_Remove:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { subject.Remove("../../edge") @@ -898,8 +800,6 @@ func TestWindow_Manager_Remove_Ugly(t *core.T) { func TestWindow_Manager_Platform_Good(t *core.T) { // Manager Platform - ax7Variant := "Manager_Platform:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { got0 := subject.Platform() @@ -910,8 +810,6 @@ func TestWindow_Manager_Platform_Good(t *core.T) { func TestWindow_Manager_Platform_Bad(t *core.T) { // Manager Platform - ax7Variant := "Manager_Platform:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { got0 := subject.Platform() @@ -922,8 +820,6 @@ func TestWindow_Manager_Platform_Bad(t *core.T) { func TestWindow_Manager_Platform_Ugly(t *core.T) { // Manager Platform - ax7Variant := "Manager_Platform:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { got0 := subject.Platform() @@ -934,8 +830,6 @@ func TestWindow_Manager_Platform_Ugly(t *core.T) { func TestWindow_Manager_State_Good(t *core.T) { // Manager State - ax7Variant := "Manager_State:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { got0 := subject.State() @@ -946,8 +840,6 @@ func TestWindow_Manager_State_Good(t *core.T) { func TestWindow_Manager_State_Bad(t *core.T) { // Manager State - ax7Variant := "Manager_State:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { got0 := subject.State() @@ -958,8 +850,6 @@ func TestWindow_Manager_State_Bad(t *core.T) { func TestWindow_Manager_State_Ugly(t *core.T) { // Manager State - ax7Variant := "Manager_State:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { got0 := subject.State() @@ -970,8 +860,6 @@ func TestWindow_Manager_State_Ugly(t *core.T) { func TestWindow_Manager_Layout_Good(t *core.T) { // Manager Layout - ax7Variant := "Manager_Layout:good" - core.AssertContains(t, ax7Variant, "good") subject := new(Manager) result := core.Try(func() any { got0 := subject.Layout() @@ -982,8 +870,6 @@ func TestWindow_Manager_Layout_Good(t *core.T) { func TestWindow_Manager_Layout_Bad(t *core.T) { // Manager Layout - ax7Variant := "Manager_Layout:bad" - core.AssertContains(t, ax7Variant, "bad") subject := new(Manager) result := core.Try(func() any { got0 := subject.Layout() @@ -994,8 +880,6 @@ func TestWindow_Manager_Layout_Bad(t *core.T) { func TestWindow_Manager_Layout_Ugly(t *core.T) { // Manager Layout - ax7Variant := "Manager_Layout:ugly" - core.AssertContains(t, ax7Variant, "ugly") subject := new(Manager) result := core.Try(func() any { got0 := subject.Layout()