MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / testFloatDockViaManager

Function testFloatDockViaManager

tests/container_manager_test.cpp:73–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void testFloatDockViaManager()
74{
75 ContainerManager m;
76
77 // Simulate a panel parent with a vertical layout — this is what
78 // AppletPanel will hand us in Phase 4.
79 QWidget panel;
80 auto* layout = new QVBoxLayout(&panel);
81 layout->setContentsMargins(0, 0, 0, 0);
82
83 auto* c = m.createContainer("c1", "C1");
84 layout->addWidget(c);
85
86 // Float.
87 m.floatContainer("c1");
88 report("float transitions dockMode", c->isFloating());
89 report("container removed from panel layout",
90 layout->indexOf(c) == -1);
91
92 // Dock.
93 m.dockContainer("c1");
94 report("dock transitions back to panel", c->isPanelDocked());
95 report("container reinserted into panel layout",
96 layout->indexOf(c) >= 0);
97}
98
99void testSaveRestoreRoundTrip()
100{

Callers 1

mainFunction · 0.85

Calls 6

createContainerMethod · 0.80
floatContainerMethod · 0.80
dockContainerMethod · 0.80
isPanelDockedMethod · 0.80
reportFunction · 0.70
isFloatingMethod · 0.45

Tested by

no test coverage detected