I'm struggling understanding how to make tests for a game engine. Until now, if I had a console app without graphics that was easy. Its function, class, had its own test.
Now with a game engine its more complicated. In order to test something, I have to create an app which initializes everything (glew, glfw, etc) and starts a window. For every test, I have to do this and at the end of the test, the app is getting destroyed.
Question 1. Is it better to create an app that will live for the entire test cycle and basically all tests will use that app reference to test its functionalities?
Question 2. What happens when a test must test graphics? The test slows down in this case a lot, while the meaning of unit tests is to run fast and be non-blocking. Usually in this step tests block (user input for example).
Usually, when I had to test programs like os functionality or anything else that was just a console app, it was quite easy to create unit tests. Now I'm struggling a lot...
Any good bits of advice or links to tutorials that can help? Thanks!