summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2022-01-30With auto_brace_complete enabled, selected text now gets wrapped by bracesIgor Kordiukiewicz
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-27Merge pull request #57281 from Rubonnek/rename-subsequenceRémi Verschelde
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-23Fix selection being deleted and indentation not being accounted forPreslavb
2022-01-23Merge pull request #56337 from cdemirer/fix-array-dictionary-idRémi Verschelde
2022-01-22Rename request_code_completion signalkobewi
2022-01-19Improve the default project themeHugo Locurcio
The new default project theme uses StyleBoxFlat extensively for a more modern design and better scalability to multiple resolutions. SVG icons are now used in place of PNG icons. While this does not allow for true vector-based icon drawing (icons are still rasterized at load-time), this makes the design work easier for contributors and opens the door to vector drawing in the future (e.g. with polygons or SDFs). Like for editor icons, the SVG header file is now built automatically when a SVG file is changed. This removing the need for running `make_header.py` manually (TODO). The "Use Hidpi" project setting has been removed in favor of a "Default Theme Scale" project setting, which allows creating the default theme at a higher/lower scale than the default. This can be used when designing GUIs with a high base resolution to ensure crisp visuals. Co-authored-by: Yuri Sizov <yuris@humnom.net>
2022-01-18Merge pull request #56668 from akien-mga/array-slice-nicer-bound-checksRémi Verschelde
2022-01-18Unify variable and array declarations in shadersYuri Roubinsky
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-13[TextServer] Improvements for line breaking, "Fill" alignment, overrun, and ↵bruvzg
interaction between these modes. Fix "Fill" alignment processing wrong side of the text if overrun trim was applied. Improve "Fill" alignment to avoid adding excessive subsequent spaces or elongations. Add font detection to the overrun, to correctly add ellipsis (was using last glyph font, which doesn't necessary have dot character). Improve line breaking to avoid adding excessive subsequent soft break points for languages without word separator. Port missing overrun/justification code to the Fallback text server. Fix inferred text direction detection by controls. Add tests for "Fill" alignment and line breaking glyph flags.
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!
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-12-30Fix Array and Dictionary id() and dictionary test bugcdemirer
2021-12-21Refactor render_mode in shaders, forbid declaring duplicatesYuri Roubinsky
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-09align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke
2021-12-08Make `compile` shader function to use struct instead long parameter listYuri Roubinsky
2021-12-07Merge pull request #35901 from nathanfranke/pool-byte-array-subarray-exclusiveRémi Verschelde
2021-12-02Merge pull request #55545 from akien-mga/doc-aabb-has_pointRémi Verschelde
AABB: Improve docs and test for `has_point`
2021-12-02Merge pull request #55474 from akien-mga/copy-operators-no-referenceRémi Verschelde
2021-12-02AABB: Improve docs and test for `has_point`Rémi Verschelde
Contrarily to the 2D Rect2i counterpart, it doesn't make much sense in 3D and for floating-point AABBs to exclude points on some of its faces.
2021-12-02Merge pull request #53868 from aaronfranke/curveRémi Verschelde
2021-12-01Allow using empty statements in the shader, added formatting warningYuri Roubinsky
2021-11-30Improve Curve with const and real_tAaron Franke
2021-11-30Don't return reference on copy assignment operatorsRémi Verschelde
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this can lead to confusing code and subtle bugs. According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++ allows any arbitrary return type, so this is standard compliant. This could be re-assessed if/when we have an actual need for a behavior more akin to that of the C++ STL, for now this PR simply changes a handful of cases which were inconsistent with the rest of the codebase (`void` return type was already the most common case prior to this commit).
2021-11-26PackedByteArray, Array slice end exclusive, rename subarray to sliceNathan Franke
2021-11-25Merge pull request #55227 from ator-dev/fix-code-foldingRémi Verschelde
2021-11-24Fix code folding when end of block is unindented delimiterator-dev
2021-11-24Merge pull request #52456 from kleonc/image-fill-rectRémi Verschelde
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-23Add Image::fill_rect methodkleonc
2021-11-17Fix divide by zero in pck_packerPaulb23
2021-11-12Use "enum class" for input enumsAaron Franke
2021-11-11Rect2: Clarify docs for `has_point` excluding bottom and right bordersRémi Verschelde
Improve tests, as well as documentation for `expand`.
2021-11-11String: Remove `erase` method, bindings can't mutate StringRémi Verschelde
2021-11-07Move and organize tests into subfoldersAaron Franke
2021-11-05Rename AABB `get_area` to `get_volume`Brian Semrau
2021-10-30Modify Dictionary::operator== to do real key/value comparison with recursive ↵Emmanuel Leblond
support (and add unittests)
2021-10-28clang-format: Disable alignment of operands, too unreliableRémi Verschelde
Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
2021-10-28Implement TextServer `strip_diacritics` function.bruvzg
2021-10-25Refactored Node3D rotation modesreduz
* Made the Basis euler orders indexed via enum. * Node3D has a new rotation_order property to choose Euler rotation order. * Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations. The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).