Open greenthepear opened 5 months ago
Has been achieved here, if not in a tricky way: https://github.com/tinne26/etxt/blob/main/testdata_generate.go
Issue opened on ebitengine's repo: https://github.com/hajimehoshi/ebiten/issues/3010
Thanks to the issue I've been notified that TestMain
is a thing. The task is now to create these tests
We must find a reliable way to do snapshot testing rather than eyeballing stuff. Ebitengine's rendering makes it tricky to compare what is being rendered to a premade image since all the
ebiten.Image
methods need to be called when the game is running, making writing tests rather challenging - something like cb0fb1f simply doesn't work.Essentially the task is to either write tests that features a game loop or find another way to get
ebiten.Image
s rendered and compared to premade ones in them.I think I will also open an issue on Ebitengine's repo to either get some debugging tools or at least get some advice.