Basically, our objective is to make sure that the interface to the graphics provided by the backend works as expected. However as most of these can only be verified by a manual interaction, these will mostly be interactive.
The following list summarizes the way the testcases are going to be implemented:
- Testing a specific feature : for example, fullScreen, iconifying window will just require enabling that feature and updating the screen and collect if it works or not from the user. There is not much to it.
- Testing Aspect ratio correction: Like the previous case they can be just invoked and noticed if it works but additionally we need to make sure that it does correctly the job we intended. So for this case, we expect the screen to resize to 320×240 as the game data is meant for that resolution, for other resolutions the data should appear compressed or stretched. To simulate this I have drawn an ellipse with minor/major arc ratio as 200/240. So that when the backend does aspect ratio correction, it necessarily stretches the minor axis to 240 and the ellipse should appear as a circle.
- Testing palettized cursors: For testing palettized cursors, I have drawn my own cursor which is basically a square with a black dot that signifies the hotspot of the cursor. The user should be able to see it, move it and when clicked the test terminates. In the background I would also make a check if the palette are the same as specified.
- Testing blitting a bitmap on screen: This is the most basic test of the GFX testsuite which makes sure if the backend is able to illuminate the screen. If this works probably the other code which draw things on screen should also work. This is implemented by setting the buffer to a color and then putting it up on the screen.
- Testing scaled cursors : Scaled cursors basically act as a hint to backend that when or not to scale the cursor.
Normally, the data presented on the screen is scaled by some factor (1x, 2x or 3x). So if the cursorTargetScale parameter is set to 1, the cursor should scale as the normal data would, however if it is set to 2 and the screen is scaled y 2x, the cursor should not be scaled.
To test this feature we would iterate over all the graphics modes making combinations of cursorTargetScale and scaling factor, the cursor movements should ideally work as normal, if they don’t there might be a bug in the backend.
Thats all for now, i would update more once i finalize all this ;).