Open qwertychouskie opened 6 years ago
After some discussion here our preferred solution for unit testing: 1) Add a new file that controls all unit tests (i.e. move the corresponding function out of main.cpp) 2) Do a test as the second statement in main (i.e. after initialising CommandLine):
if(CommandLine::has("--unit-testing") ...
i.e. without loading any assets.
3) modify all existing unit tests to work without assets. The tests that need a model/texture/... could initially be disabled, or we could add a second command line option (--unit-test-with-assets). Long term: we can include some very limited assets (i.e. a model and a texture or two) to a data/test directory for re-enabling more tests.
Considering the very very limited amount of testing, I set this as a very low priority, though it would still be great to get this (and more tests) in!!
The unit tests currently require the assets, though it probably should not. See https://github.com/supertuxkart/stk-code/pull/3130.