ce4612543544b2c489307a52b30e4f11ec186339
Add 42 new assertions covering: bw-compat register without opts, multi-active open(A)+open(B) leaving both open, per-id close(id), bw-compat close()/is_open() operating on the focused panel, layout- slot resolution (left-half / right-half / center default / custom-fn), Loud-Error on unknown slot name, hit-test dispatch against window bounds with reverse open-order, is_pausing scanning all open windows. Existing 12 baseline assertions retained and still pass via the bw- compat shim. Total 54 pass / 0 fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lib-core.panel-test
Test-module for lib-core.panel. 10 assertions covering registry lifecycle,
theme validation, error handling, pause-gate, and context-menu dispatch.
Version: 0.1.0 Lib-ID: lib-core.panel-test Requires: lib-core.panel v0.1.0 Tags: test, panel, ui
Running
export PATH="/c/msys64/mingw64/bin:$PATH"
cd ~/Projects/Sporel/sporel-engine
SPOREL_LIBS_DIR=~/Projects/Sporel/sporel-libs SPOREL_CI=1 SPOREL_LOG_STDERR=1 \
./build/Sporel.exe --test-libs=lib-core.panel-test 2>&1 | tail -15
Expected: pass=10 fail=0.
Assertion Summary
- register + open / close round-trip
- close after open works
- toggle twice opens then closes
- open with unknown widget_id raises an error
- set_theme with valid override is visible via get_theme
- set_theme with unknown key raises an error
- register without render function raises an error
- pause_on_open=true widget makes is_pausing() true; close makes it false
- context-menu action callback invoked on click inside its row
- non-pause widget: is_pausing() is false
Description
Languages
Lua
100%