YoYoGames / GM-TestFramework

Repository for GameMaker's Test Framework
Other
20 stars 10 forks source link

Framework Improvement: TestAsync object with helper functions for buffer comparisons when testing draw functions #55

Closed Indibulous closed 3 months ago

Indibulous commented 3 months ago

Description

In order to make creating tests for draw functions faster and easier, an object should be created that inherits from objTestAsync, and contains functions that can be used to save whatever has been drawn during a test, and compare it against a saved buffer to validate that it's working successfully.

Requirements

The object, called something like objTestAsyncDraw, should be able to be used in testAsyncs to allow access to these buffer comparison helper functions.

There should be 2 helper functions: one that creates a surface to begin drawing to, as well as taking in a test name string used to identify files related to the test; and another to stop drawing to that surface, save the surface to a buffer, and compare the buffer against a file using the name supplied in the first function. (It would also be helpful to have this second function output the resulting buffer as a file, as well as the surface as an image file, both using the test name, to allow manual verification, and easy creation of new buffers to compare against.)

Steps To The Task