summaryrefslogtreecommitdiff
path: root/tests/test_macros.h
AgeCommit message (Collapse)Author
2023-02-09Add Unit Tests for Viewport InputEvent handlingMarkus Sauermann
2023-02-09Remove `m_object` parameter from unit test MacrosMarkus Sauermann
This serves no longer any purpose and can be removed.
2023-01-29[unittests] Send Mouse events via DisplayServer instead of push_inputMarkus Sauermann
Currently Unittests simplify mouse-events by just pushing them to Viewports. For dealing with mouse-screen-coordinates (caused by the introduction of multiple native Windows) it becomes necessary to extend the DisplayServer functionality for unittests. This PR introduces DisplayServerMock based on DisplayServerHeadless, which additionally supports basic Mouse-Input handling.
2023-01-08Use BitField<> in core type masksJuan Linietsky
* All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-09-07Fix key mapping changes when moving from macOS to other platformbruvzg
Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-08-02Merge pull request #61315 from lawnjelly/variant_bucket_poolsRémi Verschelde
Variant memory pools
2022-07-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-07-04Variant memory poolslawnjelly
Memory pools via PagedAllocator for Transform2D, Transform3D, Basis and AABB.
2022-05-23Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git.
2022-05-17doctest: Update to 2.4.8Rémi Verschelde
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-04-28remove escapes in gdscript test outputNathan Franke
2022-04-22Use Input::push_input for tests plus extra mouse testingPaulb23
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2022-01-02Fix various typosluz paz
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
2021-11-12Use "enum class" for input enumsAaron Franke
2021-11-07Move and organize tests into subfoldersAaron Franke
2021-10-30Modify Dictionary::operator== to do real key/value comparison with recursive ↵Emmanuel Leblond
support (and add unittests)
2021-09-20Add remaning code edit unit testsPaulb23
2021-09-01Create framework for testing SignalsPaulb23
2021-09-01Allow unit testing SceneTree OjectsPaulb23
2021-06-04Rename Quat to QuaternionMarcel Admiraal
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-01-08Use comma over `<<` operator for all unit test loggingAndrii Doroshenko (Xrayez)
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.
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-21Add unit test for `RandomNumberGenerator`Andrii Doroshenko (Xrayez)
This covers RNG functionality completely. Co-authored-by: @vinayakmtiwari.
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-09-02Register GDScript test tools as test commands to run via command-lineAndrii Doroshenko (Xrayez)
2020-08-02Stringify `Variant` compatible types for doctest outputAndrii Doroshenko (Xrayez)
2020-07-30Hide implementation details of doctest macrosAndrii Doroshenko (Xrayez)
`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.