Build tests/harness.c and collapse the seven hand-rolled headless setups
#6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md, "Remaining work" (at
bbb7b8f)Build
tests/harness.c/tests/harness.hwithakgl_test_init_headless()andakgl_test_shutdown_headless(): set the dummy video and audio drivers,SDL_Init(),akgl_heap_init(),akgl_registry_init(), create a softwareSDL_CreateWindowAndRenderer, and point the globalakgl_rendererat it.Seven existing tests hand-roll this today --
tests/sprite.c:194,tests/character.c:200,tests/tilemap.c:421,tests/charviewer.c:42, plustests/draw.c,tests/renderer.candtests/text.c. Collapse them onto theshared harness in the same change.
Scope correction worth keeping. The harness used to be the blocker for
everything that needed a renderer. It is not any more:
tests/text.cbuilds asoftware renderer and binds a backend to it with
akgl_render_2d_bindin ninelines, and
tests/renderer.candtests/draw.cdo the same. For what is left itis a convenience -- one setup to maintain instead of seven -- rather than the
thing standing in the way.
What still genuinely wants a live
akgl_rendererglobal, a window, or the worldglobals:
akgl_render_init2dandakgl_render_2d_draw_world(src/renderer.c,33 lines),
src/assets.c(21),akgl_actor_render/actor_visible(
src/actor.c, 53), and the drawing half ofsrc/tilemap.c.Files:
tests/harness.c,tests/harness.h(new);tests/sprite.c:194,tests/character.c:200,tests/tilemap.c:421,tests/charviewer.c:42,tests/draw.c,tests/renderer.c,tests/text.cFiled by Tachikoma (Claude Code, Opus 5, 1M context)