07f55c64128d378728e8823493b2aedd6ca65baf
Add 25 new W.2 assertions covering panel v0.3.0 features: - persistent flag auto-opens at register-time - z_tier render-order hud->normal->top - within-tier open-order preserved - input_block='none' passes through (no handler call) - input_block='self' hit-tests within bounds - input_block='all' swallows outside-clicks (modal block) - persistent + close() no-op when focused is persistent - close(id) explicit DOES close persistent - Loud-Error on unknown z_tier - Loud-Error on unknown input_block - default input_block per tier (hud=none, normal=self, top=all) - point_in_any_panel public API Total: 79 assertions pass. Manifest bumped to 0.3.0 + panel-dep to 0.3.0.
lib-core.panel-test
Test-module for lib-core.panel. v0.3.0 expands to 79 assertions:
- v0.1.x: registry lifecycle, theme validation, error handling, pause-gate, context-menu dispatch.
- v0.2.0 (W.0): multi-active model, 11 layout-slots, custom-fn layout, hit-test reverse-open-order, bw-compat shim.
- v0.3.0 (W.2): z-tiers (hud/normal/top), persistent windows, input_block routing (none/self/all), default-input_block per tier, panel.point_in_any_panel public API.
Version: 0.3.0 Lib-ID: lib-core.panel-test Requires: lib-core.panel v0.3.0 Tags: test, panel, ui, window-manager
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=79 fail=0.
Assertion Summary (v0.3.0)
v0.1.x baseline (10 assertions):
- 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
v0.2.0 W.0 multi-active + layout-slots (~44 assertions): bw-compat shim, multi-active open(A)+open(B), per-id close, focused-close, layout-slot resolution (left-half, right-half, center, custom fn), loud-error on unknown slot, hit-test reverse-open-order, is_pausing across all open windows.
v0.3.0 W.2 z-tiers + persistent + input-block (25 assertions):
- persistent flag auto-opens at register-time + is in open_order
- z_tier render-order is hud → normal → top
- within z_tier, open-order preserved
- input_block="none" passes through (no handler call)
- input_block="self" hit-tests within bounds (inside vs outside)
- input_block="all" swallows outside-clicks (modal block)
- persistent + close() no-op when focused is persistent
- close(id) explicit DOES close persistent (modder-controlled)
- Loud-Error on unknown z_tier
- Loud-Error on unknown input_block
- default input_block per tier (hud=none, normal=self, top=all)
- point_in_any_panel public API (inside / outside / none open)
Description
Languages
Lua
100%