Tests: Tidy up compiled tests

This commit is contained in:
Thaddeus Crews 2026-02-19 16:28:12 -06:00
parent aa094e93e3
commit a7b74be08c
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
54 changed files with 471 additions and 378 deletions

View file

@ -722,7 +722,12 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print("\n");
}
#ifdef TESTS_ENABLED
#ifndef TESTS_ENABLED
Error Main::test_setup() {
ERR_FAIL_V(ERR_UNAVAILABLE);
}
void Main::test_cleanup() {}
#else
// The order is the same as in `Main::setup()`, only core and some editor types
// are initialized here. This also combines `Main::setup2()` initialization.
Error Main::test_setup() {
@ -931,7 +936,7 @@ void Main::test_cleanup() {
OS::get_singleton()->finalize_core();
}
#endif
#endif // TESTS_ENABLED
int Main::test_entrypoint(int argc, char *argv[], bool &tests_need_run) {
for (int x = 0; x < argc; x++) {