mac-comp127 / kilt-graphics

Graphics and UI library for learning software development principles in Java
https://mac-comp127.github.io/kilt-graphics/
2 stars 17 forks source link

Graphics tests #11

Closed pcantrell closed 3 years ago

pcantrell commented 3 years ago

Adds regression tests for graphics classes. These tests don't cover any of the animation or event handling stuff, but cover graphics and basic CanvasWindow behavior fairly comprehensively.

This PR includes a new rendering test helper, which works by comparing a test’s GraphicsObject output to a reference image. The rendering tests work as follows:

Here is an example of a rendering test suite and its expected output images.

Discovered and fixed a handful of bugs in the course of writing the tests. Fixed #9.