summaryrefslogtreecommitdiff
path: root/tests/core
AgeCommit message (Collapse)Author
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.
2022-03-29Add extra unit tests for Geometry2Dkneejuicer
2022-03-28Expose Color's `to_linear()` and `to_srgb()` to scriptingHugo Locurcio
2022-03-24Refactor Object metadatareduz
* API kept the same (Although functions could be renamed to set_metadata/get_metadata in a later PR), so not much should change. * Metadata now exposed as individual properties. * Properties are editable in inspector (unless metadata name begins with _) under the metadata/ namespace. * Added the ability to Add/Remove metadata properties to the inspector. This is a functionality that was requested very often, that makes metadata work a bit more similar to custom properties in Blender.
2022-03-20Rename `AStar` to `AStar3D`Yuri Roubinsky
2022-03-18Merge pull request #58233 from bruvzg/gde_tsRémi Verschelde
2022-03-17Update color constants to use HEX codestaigi100
2022-03-17Unify TextServer built-in module and GDExtension code.bruvzg
2022-03-12Fix Slerp C# docs and add test cases for vectors in the same directionAaron Franke
2022-03-10Merge pull request #58485 from aaronfranke/time-offsetRémi Verschelde
2022-03-09Remove VARIANT_ARG* macrosreduz
* Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-02-23Add offset string from minutes conversion method to Time singletonAaron Franke
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-10Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git. Added `misc/scripts/codespell.sh` to make it easier to run it once in a while and update the skip and ignore lists.
2022-02-05Merge pull request #57620 from Haydoggo/expression-exp-fixRémi Verschelde
Fix Expression's parsing of positive exponent literals
2022-02-05Make parser treat all exponent literals as floatHayden
2022-02-04Core: Move Vector2i to its own `vector2i.h` headerRémi Verschelde
Also reduce interdependencies and clean up a bit.
2022-02-04Core: Move Rect2i to its own `rect2i.h` headerRémi Verschelde
And take the opportunity to improve interdependencies a bit with forward declares where possible.
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg
2022-02-04String: Add contains().Anilforextra
2022-01-31Fix incorrect Rect2i calculations: intersects and enclosesMarkus Sauermann
Clarify expand documentation
2022-01-29simplify formatting scripts, add a clang-tidy script, and run clang-tidyNathan Franke
2022-01-27Merge pull request #57205 from TechnoPorg/variant-template-castRémi Verschelde
Allow method binds to take Object subclasses as arguments
2022-01-26Rename String::is_subsequence_ofi to String::is_subsequence_ofnWilson E. Alvarez
2022-01-25Allow method binds to take Object subclasses as argumentsTechnoPorg
This commit adds a condition to VariantCaster that casts Variants of type OBJECT to any type T, if T is derived from Object. This change enables a fair bit of code cleanup. First, the Variant implicit cast operators for Node and Control can be removed, which allows for some invalid includes to be removed. Second, helper methods in Tree whose sole purpose was to cast arguments to TreeItem * are no longer necessary. A few small changes also had to be made to other files, due to the changes cascading down all the includes.
2022-01-23Merge pull request #56337 from cdemirer/fix-array-dictionary-idRémi Verschelde
2022-01-18Merge pull request #56668 from akien-mga/array-slice-nicer-bound-checksRémi Verschelde
2022-01-15Replace String::num_real code with a wrapper around String::numAaron Franke
2022-01-14Add tests for Vector2/Vector2i/Vector3/Vector3iAaron Franke
2022-01-13Fix 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,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-10`Array`: Relax `slice` bound checks to properly handle negative indicesRémi Verschelde
The same is done for `Vector` (and thus `Packed*Array`). `begin` and `end` can now take any value and will be clamped to `[-size(), size()]`. Negative values are a shorthand for indexing the array from the last element upward. `end` is given a default `INT_MAX` value (which will be clamped to `size()`) so that the `end` parameter can be omitted to go from `begin` to the max size of the array. This makes `slice` works similarly to numpy's and JavaScript's.
2022-01-05Add list initialization support for Vector & LocalVectorHaoyu Qiu
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-30Fix Array and Dictionary id() and dictionary test bugcdemirer
2021-12-16Make `--doctool` locale awareHaoyu Qiu
* Adds `indent(str)` to `String`: * Indent the (multiline) string with the given indentation. * This method is added in order to keep the translated XML correctly indented. * Moves the loading of tool/doc translation into `editor/editor_translation.{h,cpp}`. * This will be used from both `EditorSettings` and the doc tool from `main`. * Makes use of doc translation when generating XML class references, and setup the translation locale based on `-l LOCALE` CLI parameter. The XML class reference won't be translated if `-l LOCALE` parameter is not given, or when it's `-l en`.
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-07Merge pull request #35901 from nathanfranke/pool-byte-array-subarray-exclusiveRémi Verschelde