Add unit testing suite (doctest + CTest) #12
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?
Set up a unit testing suite for engine logic that runs without a window or GPU.
Setup
third_party/enable_testing()in the rootCMakeLists.txttests/dir, one test executable per module (e.g.tests/util/,tests/jobs/), each registered with CTestdev testcommand tobin/devthat builds and runsctest --test-dir build --output-on-failureInitial tests
util/pool.hpp: create/destroy, slot reuse, stale handles rejected after generation bumphandles.hpp: invalid handle behavior, equalityutil/delegate.hpp: bind/invoke/unbindScope
In scope: pure logic that doesn't need a window or GPU (util, handles, scene/entity ops, jobs, render graph barrier/ordering logic if it can run without a device).
Out of scope: Vulkan rendering correctness. That stays covered by
testbed/andexamples/.Later
Done when
dev testbuilds and runs all tests from a clean build