Age | Commit message (Collapse) | Author |
|
|
|
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>
|
|
Port OrderedHashMap tests to doctest
|
|
Port Basis tests to use doctest.
|
|
|
|
|
|
|
|
|
|
Fix heap use after free in the doctest "main".
|
|
|
|
|
|
|
|
`test_macros.h` is created to provide various macros acting as aliases for
doctest macros to work better with Godot internals and conventions. This also
makes it accessible for those who'd like to start writing tests in Godot, as
most vital information can be put together and documented directly in
`test_macros.h` header.
Developers are encouraged to include the new `tests/test_macros.h` for writing
new tests over `thirdparty/doctest/doctest.h`.
Added `TEST_CASE_PENDING("name")` as an alias for
`TEST_CASE("name", doctest::skip())` which could be used to mark failing tests
for issues yet to be fixed, so as to not affect CI testing results.
Added `ERR_PRINT_OFF` and `ERR_PRINT_ON` to control error printing for testing
various **expected** failure paths within Godot without polluting the test
summary with error messages.
|
|
|
|
Added a test case for `VariantWriter` and `VariantParser` overflows.
|
|
|
|
|
|
Enable support for C++ modules tests
|
|
Modules-specific tests can be written under respective module folders.
Each module should have "tests" folder created with the tests implemented
as `doctest` headers, so they can be collected by the buildsystem and
included directly in `tests/test_main.cpp` to be compiled.
|
|
Allows switching `tests=yes`/`no` and rebuilding only tests and main,
instead of the whole engine.
Co-authored-by: Andrii Doroshenko (Xrayez) <xrayez@gmail.com>
|
|
|