mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Port ClassDB tests to use doctest
Extracted the most minimal core initialization functionality from `setup()` and `setup2()` so that `ClassDB` could be tested properly (input, audio, rendering, physics etc, are excluded). Display and rendering servers/singletons are not initialized at all. Due to the fact that most subsystems are disabled, fixed various crashes in the process (in order): - `AcceptDialog` OK/cancel swap behavior (used `DisplayServer` while `register_scene_types()`); - `make_default_theme` which depends on `RenderingServer`; - `XRServer` singleton access while calling `register_modules_types()`; - hidden bug in a way joypads are cleaned up (MacOS and Linux only). Removed manual `ClassDB` init/cleanup calls from `test_validate_testing.h`. ClassDB tests: Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
This commit is contained in:
parent
87ae509905
commit
6f426c3360
11 changed files with 905 additions and 903 deletions
|
|
@ -88,7 +88,9 @@ void OS_LinuxBSD::finalize() {
|
|||
#endif
|
||||
|
||||
#ifdef JOYDEV_ENABLED
|
||||
memdelete(joypad);
|
||||
if (joypad) {
|
||||
memdelete(joypad);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue