Description
ResourceSpriteTestSuite was never covered by the summer 2024 refactor campaign. The whole suite is one fact, sprite_add, containing 6 asserts across 34 lines — it reports a single result for six distinct checks.
The six checks are: the sprite is valid, it has the correct subimage count, the correct width, the correct height, it preserves colour when alpha is 0, and it deletes successfully.
The colour-preservation assert requires a surface and buffer round-trip, so that scenario carries real setup; the rest are cheap property reads on the same added sprite. Each new fact should call sprite_add() and sprite_delete() itself so it is self-contained.
This suite is also very thin for the area it covers — one function out of the whole sprite API. A follow-up test-proposal issue for broader sprite_* coverage would be worthwhile, but is out of scope here.
Target: 6 facts.
Script Name
ResourceSpriteTestSuite
Steps To The Task
Description
ResourceSpriteTestSuitewas never covered by the summer 2024 refactor campaign. The whole suite is one fact,sprite_add, containing 6 asserts across 34 lines — it reports a single result for six distinct checks.The six checks are: the sprite is valid, it has the correct subimage count, the correct width, the correct height, it preserves colour when alpha is 0, and it deletes successfully.
The colour-preservation assert requires a surface and buffer round-trip, so that scenario carries real setup; the rest are cheap property reads on the same added sprite. Each new fact should call
sprite_add()andsprite_delete()itself so it is self-contained.This suite is also very thin for the area it covers — one function out of the whole sprite API. A follow-up test-proposal issue for broader
sprite_*coverage would be worthwhile, but is out of scope here.Target: 6 facts.
Script Name
ResourceSpriteTestSuite
Steps To The Task
sprite_addinto 6 facts namedsprite_add #1throughsprite_add #6sprite_add()/sprite_delete()so it is self-contained// SPRITE ADD TESTSsection comment header