summaryrefslogtreecommitdiff
path: root/tests/core
AgeCommit message (Collapse)Author
2022-09-14Test, refactor and fix a bug in Basis.get_axis_anglefabriceci
2022-09-09Fix parsing of XML CDATA and add test casesHaoyu Qiu
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-09-04Replace Rect2(i) has_no_area with has_areaAaron Franke
2022-09-04Replace AABB has_no_volume with has_volumeAaron Franke
Also replace has_no_surface with has_surface
2022-09-01Merge pull request #55617 from madmiraal/fix-55384Rémi Verschelde
2022-09-01Merge pull request #63968 from KoBeWi/finding_stuff_in_a_dictionaryRémi Verschelde
2022-08-30Fix Geometry3D::get_closest_points_between_segments() returns NaNMarcel Admiraal
Also fix: - Geometry3D::get_closest_distance_between_segments() returning incorrect values. - Test for Geometry3D::get_closest_distance_between_segments() testing for an incorrect value.
2022-08-30Add `String.to_{camel,pascal,snake}_case` methodsDanil Alexeev
2022-08-29Rename String `plus_file` to `path_join`Aaron Franke
2022-08-26Rename `str2var` to `str_to_var` and similarMicky
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too. - `var2str` -> `var_to_str` - `str2var` -> `str_to_var` - `bytes2var` -> `bytes_to_var` - `bytes2var_with_objects` -> `bytes_to_var_with_objects` - `var2bytes` -> `var_to_bytes` - `var2bytes_with_objects` -> `var_to_bytes_with_objects` - `linear2db` -> `linear_to_db` - `db2linear` -> `db_to_linear` - `deg2rad` -> `deg_to_rad` - `rad2deg` -> `rad_to_deg` - `dict2inst` -> `dict_to_inst` - `inst2dict` -> `inst_to_dict`
2022-08-24Formatting changes to string test commentsMarcus Elg
2022-08-23Add %v for formatting vectorsMarcus Elg
2022-08-18Make `property_*_revert` methods multilevel and expose them for scriptingYuri Sizov
2022-08-16Add Dictionary.find_key()kobewi
2022-08-09vector4 distance_squared_to and update csharpantonWetzel
2022-08-08Add tests for empty/unnamed arguments to ClassDB, Variant, GDScriptYuri Sizov
2022-08-07Vector4/Vector4i: Add missing methods, tests and fix change of sign operatorHendrik Brucker
2022-08-04Tests: Silence some intentional errorsRémi Verschelde
Also fix printing messages in ClassDB test.
2022-08-04Add tests file for Quaternion unit tests, with initial UTscodepatzer
- Test constructors and quaternion product. - Add test case for Axis-Angle construction about Y-axis. - Add test case for xform of i-, j-, & k-unit vectors. - Add test case for construction from Basis. - Add test case for xform of arbitrary vector. - Add stress test case: many Quaternions xform many vectors. - Make comments consistent with style guide.
2022-08-04Add Unit Tests for InputEventKeyTimon Bestebreur
2022-08-04Merge pull request #54325 from skimmedsquare/test-add-ridRémi Verschelde
2022-08-04Add unit tests for ShortcutTimon Bestebreur
Next to that, add entry for the test file in test_main.cpp. These test cases test the basic functionality of the shortcut module.
2022-08-04Add unit tests for RID class.Sean Kim
2022-08-02Fix consistency of translated/scaled/rotated in Transform2D and Transform3DFabian Keller
2022-08-01File: Re-add support to skip CR (`\r`) in `File::get_as_text`Rémi Verschelde
This was removed in #63481, and we confirmed that it's better like this, but we add back the possibility to strip CR as an option, to optionally restore the previous behavior. For performance this is done directly in `String::parse_utf8`. Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR. Supersedes #63717.
2022-07-30Merge pull request #42069 from Calinou/test-add-osRémi Verschelde
Add a test suite for OS
2022-07-29Swap arguments of ResourceSaver.save()kobewi
2022-07-29Add a test suite for OSHugo Locurcio
2022-07-26[Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli
- RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-22Implement a Worker ThreadPoolreduz
This PR implements a worked thread pool. It uses a fixed amount of threads in a pool and allows scheduling tasks that can be run on threads (and then waited for). It satisfies the following use cases: * HTML5 thread count is fixed (and similar restrictions are known in consoles) so we need to reuse threads. * Thread spawning is slow in general, so reusing threads is faster anyway. * This implementation supports recursive waiting for tasks, making it less prone to deadlocks if threads from the pool also run tasks. After this is approved and merged, subsequent PRs will be needed to replace the ThreadWorkPool usage by this class.
2022-07-18Use integer types in Image and ImageTexture methodsFireForge
- Image.blit_rect() - Image.blit_rect_mask() - Image.blend_rect() - Image.blend_rect_mask() - Image.fill_rect() - Image.get_used_rect() - Image.get_rect() - ImageTexture.set_size_override()
2022-07-07Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows ↵bruvzg
filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose.
2022-07-05Implement a BitField hintreduz
Allows to specify the binder that an enum must be treated as a bitfield.
2022-07-05Implemented tests for Plane getters and setters.cabinboy1031
Added tests for intersection and plane-point methods.
2022-06-17Make enum/constant binds 64-bit.bruvzg
2022-06-16Make AStar to use 64-bit logicYuri Rubinsky
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-17Create onready variables when dropping nodes and holding CtrlHaoyu Qiu
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-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-05-10Merge pull request #59643 from kneejuicer/geometry2D-testsRémi Verschelde
Add extra unit tests for Geometry2D
2022-05-05Fix inconsistent naming in TimeNicholas Huelin
2022-05-03Rename Basis get_axis to get_column, remove redundant methodsAaron Franke
2022-05-01Fix left aligned integer sign in string formattingHaoyu Qiu
2022-04-13Color: Rename `to_srgb`/`to_linear` to include base color spaceRémi Verschelde
This helps reduce confusion around sRGB <> Linear conversions by making both input and output color spaces explicit.
2022-04-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-04-07Remove unused legacy testsRémi Verschelde
They haven't been updated for years and still use the old MainLoop basic framework instead of the new doctest one. They're of dubious quality and best redone from scratch using the new framework.
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.