You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
t Add unit testing to Godot using DocTest and added to GitHub Actions CI
Implements exit codes into the engine so tests can return their statuses. Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically. Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header. This lowers the complexity of running the unit tests and even for physics should be possible to implement such a fix.
This commit is contained in:
committed by
Gordon MacPherson
parent
93b50a62e3
commit
579342810f
@@ -41,6 +41,9 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
||||
// We must override main when testing is enabled
|
||||
TEST_MAIN_OVERRIDE
|
||||
|
||||
char *cwd = (char *)malloc(PATH_MAX);
|
||||
ERR_FAIL_COND_V(!cwd, ERR_OUT_OF_MEMORY);
|
||||
char *ret = getcwd(cwd, PATH_MAX);
|
||||
|
||||
Reference in New Issue
Block a user