megadev-testing
Test Megadev games
Choose an observable contract and a small reproduction before building a harness. Use the selected ewrogers/megadev:latest sources and retain their actual compiler/SDK identity. Read Megadev integration for the verified APIs and the limits of our test fixtures. The Lab's replay, streaming and audio helpers are application code, not SDK APIs.
Make deterministic claims narrowly
Read replay contracts when recording inputs, comparing simulation or changing an input/clock boundary. Reset all authoritative state, seed a game-local PRNG, sample input at a defined logical tick and record external outcomes that affect gameplay. Compare explicit state fields at each tick; report the first divergence with its input/event and expected/actual result.
Do not hash struct padding, pointers, framebuffer state or asynchronous mailbox timing into a gameplay checksum. Keep the replay schema, logical content version, initial snapshot and exact build/assets identity. Validate the entire tape before playback and use bounded recording storage. Never silently drop ticks, overwrite a full recording or continue an invalid replay as a pass.
A recorded service outcome can reproduce a gameplay decision; it does not prove that a real CD operation finishes at the same time. Deterministic fixtures and live I/O stress are separate evidence.
Exercise integration failures
Read integration regressions when joining CD, audio, ownership and scene services. Run the actual compiled adapters against controlled delayed/failed completions. Check their externally visible contracts: no unowned buffer access, no early publication/reuse, no music command during a live reader, safe retirement and successful later work.
Keep the game's interrupt, input, renderer, allocator and service owners. Do not install competing polling loops or introduce a test-only recovery path that hides a production bug. Include a negative control that actually fails the assertion; a test that always says PASS is not qualification.