Commit Graph

131 Commits

Author SHA1 Message Date
Hugo Locurcio e924bf9dec
Add a test suite for Object 2020-11-20 13:24:14 +01:00
Hugo Locurcio 7cb21c21b3
Add a test suite for Rect2 and Rect2i 2020-11-20 12:53:37 +01:00
Rémi Verschelde d87e192be6
Merge pull request #43517 from Calinou/test-add-json
Add a test suite for JSON
2020-11-20 12:47:27 +01:00
Andrii Doroshenko (Xrayez) dc980e5f96 doctest: Do not override command-line options
Those options were likely copy-pasted from documentation examples.
This change also allows to break in the debugger by default when
assertions fail, and this can be configured via command-line interface.
2020-11-20 13:21:45 +02:00
Hugo Locurcio f91a6eba10
Add a test suite for ConfigFile 2020-11-16 14:35:10 +01:00
Rémi Verschelde 7a6eab2ce3
Merge pull request #43578 from Calinou/test-add-nodepath
Add a test suite for NodePath
2020-11-16 12:54:26 +01:00
Rémi Verschelde db98a61913
Merge pull request #43572 from Calinou/test-add-pckpacker
Add a test suite for PCKPacker
2020-11-16 12:54:02 +01:00
Hugo Locurcio bf82da3d0f
Add a test suite for NodePath 2020-11-15 22:28:25 +01:00
Hugo Locurcio 9574a834e5
Add a test suite for PCKPacker 2020-11-15 20:05:46 +01:00
Hugo Locurcio 038bbf7b6b
Add a test suite for JSON
This test suite doesn't attempt to test error/invalid cases since
the current JSON parser has a lot of false negatives.
2020-11-14 00:13:32 +01:00
Hugo Locurcio 8fefbda818
Add a test suite for Curve 2020-11-13 22:46:05 +01:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
reduz ee06a70ea6 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00
Lyuma 48e8da4aac core/command_queue_mt: Customizable size and tests
Adds unit tests for command_queue_mt.h/cpp
In this revision, some unit tests will fail due to issue #42107.
2020-10-12 08:24:08 -07:00
Andrii Doroshenko (Xrayez) 4e6b5169b0 Add a test suite for `List`
Adds a number of test cases for `List::swap()`.
2020-09-13 00:14:51 +03:00
Andrii Doroshenko (Xrayez) 174b6e817f Move GDNative `String` tests to respective module
GDNative-specific tests moved out of main `tests/` folder into
`modules/gdnative/tests`.

Include path for GDNative headers are still hardcoded in `tests/SCsub`,
but made conditional now.

Also fixed test case tag typos.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2020-09-11 14:51:38 +03:00
bruvzg 80b8eff6aa
[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
strank 16913368eb Fix doctest runner ignoring all arguments starting with --test
Instead of just the one argument that is exactly --test.
The long-form arguments --test-case and --test-suite were ignored.
2020-09-02 11:23:34 -04:00
Andrii Doroshenko (Xrayez) 0cc05c5a31 Register GDScript test tools as test commands to run via command-line 2020-09-02 01:43:26 +03:00
Rémi Verschelde a276e6fc36
Merge pull request #40955 from Calinou/test-add-expression
Add a test suite for Expression
2020-08-31 11:12:34 +02:00
Hugo Locurcio d5ffa42cd2
Add a test suite for Expression
This also makes the first parameter of `Expression::execute()` optional
from C++. Previously, it was only optional in the scripting API.
2020-08-27 15:16:09 +02:00
Hugo Locurcio 66de28ada5
Add a test suite for Gradient 2020-08-19 01:33:40 +02:00
Andrii Doroshenko (Xrayez) db1259ac70 Fix memory leak in test args 2020-07-31 23:58:22 +03:00
Rémi Verschelde 29df1919e1
Merge pull request #40928 from bruvzg/fix_test_heap_use_after_free
Fix heap use after free in the doctest "main".
2020-07-31 21:21:18 +02:00
Hugo Locurcio 979072b9a4
Add a test suite for Color 2020-07-31 21:04:16 +02:00
bruvzg 0a89498f51
Fix heap use after free in the doctest "main". 2020-07-31 21:52:48 +03:00
Andrii Doroshenko (Xrayez) 0512cc01d9 Hide implementation details of doctest macros
`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.
2020-07-30 16:58:12 +03:00
Andrii Doroshenko (Xrayez) 63720648e8 Cleanup obsolete tests from displaying in help 2020-07-29 15:07:16 +03:00
Andrii Doroshenko (Xrayez) 3f77056dc6 Add test suite for `Variant`
Added a test case for `VariantWriter` and `VariantParser` overflows.
2020-07-28 18:34:55 +03:00
Andrii Doroshenko (Xrayez) 60f53140b8 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.
2020-07-26 17:41:46 +03:00
Andrii Doroshenko (Xrayez) 9f649efe5d Move `tests` to the top-level directory 2020-07-26 00:06:07 +03:00