You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Use comma over << operator for all unit test logging
The comma operator should be preferred now according to doctest. Moved macro aliases from `ClassDB` tests to `test_macros.h`, because those are also used in `TextServer` tests.
This commit is contained in:
@@ -44,6 +44,12 @@
|
||||
// The test case is marked as failed, but does not fail the entire test run.
|
||||
#define TEST_CASE_MAY_FAIL(name) TEST_CASE(name *doctest::may_fail())
|
||||
|
||||
// Provide aliases to conform with Godot naming conventions (see error macros).
|
||||
#define TEST_COND(cond, ...) DOCTEST_CHECK_FALSE_MESSAGE(cond, __VA_ARGS__)
|
||||
#define TEST_FAIL(cond, ...) DOCTEST_FAIL(cond, __VA_ARGS__)
|
||||
#define TEST_FAIL_COND(cond, ...) DOCTEST_REQUIRE_FALSE_MESSAGE(cond, __VA_ARGS__)
|
||||
#define TEST_FAIL_COND_WARN(cond, ...) DOCTEST_WARN_FALSE_MESSAGE(cond, __VA_ARGS__)
|
||||
|
||||
// Temporarily disable error prints to test failure paths.
|
||||
// This allows to avoid polluting the test summary with error messages.
|
||||
// The `_print_error_enabled` boolean is defined in `core/print_string.cpp` and
|
||||
|
||||
Reference in New Issue
Block a user