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:
RevoluPowered authored and Gordon MacPherson committed 2020-07-24 13:05:33 +01:00
1 parent 93b50a62e3
commit 579342810f
24 files changed
+7417 -1397

No files matched your search

+4
View File
@@ -131,6 +131,10 @@ int main(int argc, char *argv[]) {
/* clang-format on */
os = new OS_JavaScript();
// We must override main when testing is enabled
TEST_MAIN_OVERRIDE
Main::setup(argv[0], argc - 1, &argv[1], false);
emscripten_set_main_loop(main_loop_callback, -1, false);
emscripten_pause_main_loop(); // Will need to wait for FS sync.