Commit Graph

663 Commits

Author SHA1 Message Date
Pedro J. Estébanez f34d580861 Revert "Implement parallel foreach() for easier multithreading"
This reverts commit e28868e30c.
2023-07-27 13:41:27 +02:00
Yuri Sizov d50c52652f Merge pull request #79805 from kumikumi/fix-subviewport-cursor
Prevent SubViewportContainer overriding Subviewport's cursor with its own cursor
2023-07-26 18:40:30 +02:00
Yuri Sizov 53ba9ccb19 Merge pull request #72346 from myaaaaaaaaa/disconnect-order
Avoid sorting CallableCustomMethodPointers by their actual address values
2023-07-26 18:39:08 +02:00
RedworkDE aee1e50b48 Fix `ProjectSettings::localize_path` for Windows paths 2023-07-26 16:18:31 +02:00
Mikko Ankkala 96b26574b9 Don't override SubViewport's cursor with SubViewportContainer's cursor
Add a warning for having a non-default value of `mouse_default_cursor_shape` in SubViewportContainer

Add test
2023-07-23 22:27:55 +03:00
Yuri Sizov b8a29f71e5 Merge pull request #79444 from Miguel0312/TestInputEvent
Add a test suite to InputEvent
2023-07-21 17:54:35 +02:00
Yuri Sizov 8ac00453d9 Merge pull request #78667 from Scony/add-advanced-navserver-tests
Add advanced `NavigationServer3D` tests
2023-07-21 17:15:22 +02:00
Pawel Lampe 1612466803 Add advanced 'NavigationServer3D' tests 2023-07-17 19:56:02 +02:00
Miguel Pereira c2ad5ca435 Added tests to InputEvent 2023-07-17 17:48:34 +02:00
Yuri Sizov 3d04a22d7c
Merge pull request #79103 from AThousandShips/array_slice_range
Fix range error for `Array.slice`
2023-07-17 16:48:48 +02:00
Hendrik Brucker a29a680920 Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own file 2023-07-17 13:25:00 +02:00
Yuri Sizov a7583881af Merge pull request #68460 from Geometror/split_texture_src
Extract and reorganize texture resource classes
2023-07-14 21:28:06 +02:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Maxim Kulkin 058604f5b8 Fix crash when saving resources with circular references
When saving resources, marking of already seen resources was
done too late, causing infinite loop traversing referenced resources
and eventual stack overflow. The change marks traversed resource
before descending to it's children, thus when this resource is
encountered again, it is already marked as seen and traversal stops.
2023-07-14 19:20:04 +02:00
Yuri Sizov 7e9d63ebd9 Merge pull request #78480 from Scony/add-more-navserver-tests
Add more basic tests for `NavigationServer3D`
2023-07-14 18:49:03 +02:00
Yuri Sizov 2a595c26d9 Merge pull request #72784 from myaaaaaaaaa/parallel-foreach
Implement parallel `foreach()` for easier multithreading
2023-07-14 18:48:49 +02:00
Yuri Sizov e88934cb74 Merge pull request #74238 from bitsawer/fix_image_convert
Fix `Image.convert()` overwriting custom mipmaps
2023-07-12 17:15:39 +02:00
Yuri Sizov f6d568b9e4 Merge pull request #66170 from RedMser/json-fix-invalid-escapes
Disallow invalid escape sequences in `JSON.parse`
2023-07-12 15:08:29 +02:00
azuloo dd0bd90865 Add a test suite for TranslationServer 2023-07-11 14:30:53 +03:00
MewPurPur cc5500f7de Fix erroneous pad_zeros warning 2023-07-08 16:16:01 +03:00
Ninni Pipping 7752a0d8d1 Fix range error for `Array.slice` 2023-07-07 23:19:42 +02:00
RedMser 427b293c7d Disallow invalid escape sequences in JSON.parse 2023-06-30 21:28:36 +02:00
Rémi Verschelde 100082b3ac
Merge pull request #74760 from lassade/unicode-err-uses-replacement-char
Don't append non unicode scalar values on the string, instead use the unicode replacement char
2023-06-22 18:30:04 +02:00
Pawel Lampe 766afce7ea Add more basic 'NavigationServer3D' tests 2023-06-21 19:46:38 +02:00
Yuri Roubinski 230385b587 Add `String.reverse` method 2023-06-21 20:40:48 +03:00
angel-721 ab4e89ecde
Add HTTPClient unit tests 2023-06-21 11:53:55 +02:00
Rémi Verschelde d252f43a86
Merge pull request #78449 from Scony/add-agent-n-map-navserver-tests
Add `agent` and `map` tests for 'NavigationServer3D'
2023-06-21 10:19:24 +02:00
Pawel Lampe e1bdde911c Add `agent` and `map` tests for 'NavigationServer3D'
This commits fixes a bug in `free()` function as well.
2023-06-20 17:48:06 +02:00
myaaaaaaaaa 5cc961627d Avoid sorting CallableCustomMethodPointers by their actual address values 2023-06-20 08:40:01 -04:00
Rémi Verschelde cce100a840
Merge pull request #75459 from kleonc/node-fix-find-children
Fix recursive `Node.find_children`
2023-06-19 22:33:46 +02:00
Rémi Verschelde 867ea7fe59
Merge pull request #74730 from MarioLiebisch/fix-74726
Fix read-only dictionaries adding missing keys
2023-06-19 21:38:38 +02:00
andybarcia 553f4f8dce
Improve error reporting when parsing CSV translation file
Fixes #46682.

Also fix unit test suite to separate generic FileAccess CSV testing
from using CSV as translation. And add more CSV translation tests.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-06-19 12:47:44 +02:00
Rémi Verschelde 1a62f1e4fc
Merge pull request #74741 from vnen/variant-not-for-everyone
Allow boolean operators for all Variant types
2023-06-18 16:28:10 +02:00
Rémi Verschelde 6fb391bc23
Fix various typos with codespell
And ignore some false positives introduced by recent versions of codespell.
2023-06-16 08:45:35 +02:00
Rémi Verschelde 95a9089fdd
Merge pull request #74813 from bruvzg/text_edit_autowrap
[TextEdit] Expose all auto-wrap modes.
2023-06-15 16:08:21 +02:00
Pawel Lampe b54c3e7e5e Add initial 'NavigationObstacle' and 'NavigationRegion' tests 2023-06-14 22:24:37 +02:00
Rémi Verschelde ae896bbd85
Merge pull request #78156 from Maran23/node-tests-processing-priority
Tests for the node (physics) processing and process priority
2023-06-13 10:27:40 +02:00
bruvzg 75e6ec8874
[TextEdit] Expose all auto-wrap modes. 2023-06-13 10:28:27 +03:00
Marius Hanl 60a17ba78d Tests for node (physics) processing and process priority 2023-06-13 00:19:43 +02:00
Rémi Verschelde 54b0907e67
Merge pull request #78015 from MewPurPur/Mom-can-we-have-a-new-Godot-logo-----We-have-a-new-Godot-logo-at-home-----The-new-Godot-logo-
Standardize and Optimize blue robot SVGs
2023-06-12 22:55:12 +02:00
MewPurPur a8412c12da Standardize and Optimize blue robot SVG
Co-authored-by: Andre Vallestero <39736205+AndreVallestero@users.noreply.github.com>
2023-06-12 18:12:40 +02:00
myaaaaaaaaa e28868e30c Implement parallel foreach() for easier multithreading 2023-06-09 08:27:32 -04:00
Rémi Verschelde 577ab3c565
Merge pull request #75746 from ajreckof/order_autocomplete
Sort code autocompletion with rules
2023-06-08 18:14:31 +02:00
Markus Sauermann 479f359ac4 Add unit test: mouse movement after slider release 2023-06-05 13:51:28 +02:00
Yuri Sizov 3a895eafc0
Merge pull request #77595 from Sauermann/fix-double-inputevent
Fix InputEvent being used twice
2023-05-30 15:25:36 +02:00
Markus Sauermann a9bf3de08e Fix InputEvent being used twice
A single mouse click can cause multiple actions, which contradicts
the paradigm that a single Input Event should cause only a single
action.

The solution consists of two parts:
1. Physics Picking as the last step during viewport input event
handling, currently doesn't set the event as handled. This PR sets
the event as handled in the case of physics picking.
2. After an InputEvent is processed by a SubVieportContainer, it is
sent to its parent, even if it set as handled within the SubViewport.
This PR adds an additional test to check if the event is handled
before propagating the event to the parent Control.
2023-05-29 02:39:09 +02:00
Kory Postma c8cac39446 Grayscale fix for Image::premultiply_alpha() and Image::convert(FORMAT_L8) while using REC.709, with added test case 2023-05-27 18:01:44 -05:00
Silc Renew 42aa5398d9 Fix Pathfollow direction
Co-authored-by: aaronfranke <arnfranke@yahoo.com>
2023-05-24 17:37:00 +09:00
ajreckof 006e899bb3 sort code completions with rules
Fixups

Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible

Trying again to improve code completion

Sort code autocompletion options by similarity based on input

To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random.

It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches.

Also moves CodeCompletionOptionCompare to code_edit.cpp

Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
2023-05-23 05:12:34 +02:00
Biggles Bristol c920a4f051 [Fixed] for "off-by-1" bug when sampling "baked" curve data towards the end of the curve.
[Fixed] Failing test "[Curve] Custom curve with free tangents" by setting the curve's `bake_resolution` to 11.
[Fixed] test messages in "[Curve] Custom curve with free tangents" to match sample offset used in each test
[Added] New test "[Curve] Straight line offset test" in response to pull request feedback.
Update tests/scene/test_curve.h

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2023-05-20 11:28:09 +01:00
myaaaaaaaaa c996863464 Streamline WorkerThreadPool tests and make them more robust 2023-05-17 17:33:08 -04:00
Rémi Verschelde 186aa649d2
Merge pull request #76945 from RandomShaper/fix_wtp
Fix multiple issues in `WorkerThreadPool`
2023-05-12 10:03:45 +02:00
Rémi Verschelde 863bcd3e2b
Merge pull request #76936 from clayjohn/revert-hsl
Revert "Add API for HSL conversion"
2023-05-12 10:03:21 +02:00
Pedro J. Estébanez 9077bb9232 Fix multiple issues in WorkerThreadPool
- Fix project settings being ignored.
- Made usages of `native_thread_allocator` thread-safe.
- Remove redundant thread-safety from `low_priority_threads_used`, `exit_threads`.
- Fix deadlock due to unintended extra lock of `task_mutex`.
2023-05-11 16:10:09 +02:00
Rémi Verschelde fd4a06c515
Merge pull request #76906 from lawnjelly/safe_acos4_2
Make acos and asin safe
2023-05-11 13:33:37 +02:00
lawnjelly 50c5ed4876 Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.
2023-05-11 08:34:34 +01:00
clayjohn f83a90192f Revert "Add API for HSL conversion"
This reverts commit 0b7fd664c1.
2023-05-10 17:45:56 -03:00
Alex Drozd cdf9c33c35 add unit tests for Curve3D 2023-05-10 19:12:06 +02:00
Rémi Verschelde 703a3ce7ad
Merge pull request #76830 from ajreckof/fix_wrapf_CI_with_too_big_float
fix a test for wrapf with signed 32-bit float
2023-05-10 10:20:03 +02:00
Rémi Verschelde 6bca6beea3
Merge pull request #76878 from RedworkDE/tests-fix-errors
Fix various errors when running the unit tests
2023-05-09 19:28:54 +02:00
Rémi Verschelde 0f444f101a
Merge pull request #76661 from bonjorno7/hsl
Add API for HSL conversion
2023-05-09 19:28:35 +02:00
RedworkDE 8e7afec479 Fix various errors when running the unit tests
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-05-09 18:40:56 +02:00
bonjorno7 0b7fd664c1 Add API for HSL conversion
Math ported pretty much 1:1 from https://en.wikipedia.org/wiki/HSL_and_HSV
Style doesn't match the existing HSV code exactly, but should be close enough.
2023-05-09 17:43:10 +02:00
ajreckof fabd9535f0 fix a test for wrapf with signed 32-bit float 2023-05-08 20:53:58 +02:00
Paulb23 0b3fba45c6 Move convert_indent into CodeEdit 2023-05-07 13:08:37 +01:00
Clay John 7a13cf9aeb
Merge pull request #75510 from SilicDev/string_erase
Reimplement `String.erase()` as immutable method
2023-05-05 10:03:49 -07:00
SilicDev 6fa4f71ca6 Reimplement String.erase 2023-05-04 00:52:35 +02:00
Rémi Verschelde e0e93ce094
Merge pull request #72421 from myaaaaaaaaa/signal-hashmap
Store Object signals in a HashMap rather than a VMap
2023-04-25 19:26:35 +02:00
Silc Renew fac8a918f9 Expose interpolation methods for 3D track in Animation class 2023-04-25 01:45:14 +09:00
Rémi Verschelde c0ee2b4968
Merge pull request #76145 from manueldun/usability-auto-indent
Fix auto-indentation in typed arrays, comments, and after colon
2023-04-24 16:45:35 +02:00
Manuel Dun fa7e6ddb83 Fix auto-indentation in typed arrays, comments, and after colon
Now the editor won't add indentation when pressing enter, is
declaring typed variables and there is a colon in the comment

example:
var a:=0#:[press enter]
no indentation
2023-04-20 18:48:21 -04:00
kleonc d159123633 Fix recursive Node.find_children 2023-04-09 09:15:21 +02:00
Juan Linietsky 223ce4fcb9 Optimize Node::add_child validation
Adding 10k nodes is almost twice as fast.
2023-04-07 13:18:47 +02:00
Rémi Verschelde 1e0f7a12f7
Merge pull request #73121 from Scony/add-initial-navi-tests
Add initial navigation tests
2023-03-16 10:46:34 -07:00
Ninni Pipping 10f385fb79 Fix `Array.slice()` rounding for `abs(step) != 1` 2023-03-14 15:46:45 +01:00
Felipe Jorge 999f3e2c13 use the unicode replacement char on error
update tests

also fix utf8 and ascii parse functions to use the replacement char

created a _replacement_char const inside the string
2023-03-12 11:46:56 -03:00
Mario Liebisch 62e1a5e235
Added two test cases 2023-03-11 18:53:17 +01:00
George Marques a1e3ef919c
Add operator NOT for all Variant types 2023-03-10 15:58:55 -03:00
bitsawer 5a9d7fd8a6 Fix Image.convert() overwriting custom mipmaps 2023-03-02 16:46:06 +02:00
myaaaaaaaaa 1ec5381c16 Store Object signals in a HashMap rather than a VMap 2023-02-25 18:44:09 -05:00
Dmitrii Maganov c5f7a89b0f Core: Identity compare objects by id, not by pointers 2023-02-24 23:33:29 +02:00
Aaron Franke c551d7489c
Explicitly cast to Variant's int type in Time tests 2023-02-20 14:46:21 -06:00
Paulb23 60161cbe7d Fix ctrl+backspace crash with multicarets on the same line 2023-02-19 12:04:14 +00:00
myaaaaaaaaa 6b0f253a45 Fix PagedArray.merge_unordered() dropping pages 2023-02-16 19:58:27 -05:00
Pawel Lampe e92adba19c Add initial navigation tests 2023-02-13 21:39:09 +01:00
Andrés Botero a90e151b2a Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 -05:00
Rémi Verschelde cd7c65ab67
Merge pull request #72862 from Sauermann/fix-viewport-event-unittests
Add Unit Tests for Viewport InputEvent handling
2023-02-09 16:21:09 +01:00
Rémi Verschelde ab4a7b2b77
Merge pull request #72547 from MewPurPur/string-split-fix
Fix String.split() with empty string and delimeter
2023-02-09 16:12:57 +01:00
Markus Sauermann ce6c290528 Add Unit Tests for Viewport InputEvent handling 2023-02-09 14:53:04 +01:00
Markus Sauermann 1b2ba353dc Remove `m_object` parameter from unit test Macros
This serves no longer any purpose and can be removed.
2023-02-09 00:20:25 +01:00
Markus Sauermann 39d79ce217 Fix mouse-button-mask on button release in unit test
On mouse-button release, the mask is 0.
2023-02-08 01:17:40 +01:00
VolTer 57e39d0ce9 Fix String.split() with empty string and delimeter 2023-02-02 01:34:11 +01:00
Rémi Verschelde e52213e2fa
More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
Rémi Verschelde cf2bf08b41
Merge pull request #71972 from Sauermann/fix-test-ds
[unittests] Send Mouse events via DisplayServer instead of push_input
2023-01-31 15:56:50 +01:00
myaaaaaaaaa 132e987633 Fail instead of segfaulting in IO tests 2023-01-31 02:21:27 -05:00
Rémi Verschelde 2d47c4c307
Merge pull request #72213 from ARez2/ARez2/master
Add Unit test for InputEventMouse
2023-01-30 10:00:45 +01:00
Markus Sauermann 7de1b1a40d [unittests] Send Mouse events via DisplayServer instead of push_input
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-29 21:29:39 +01:00
ARez 23827d4303 Add Unit test for InputEventMouse 2023-01-29 14:09:53 +01:00
Aaron Franke 5f3d3722b2
Add support for interpolating skewed transforms 2023-01-28 18:28:42 -06:00
Adam Scott 37248d7c87 Add `@GlobalScope` `is_same(a, b)` and `Variant::identity_compare()` 2023-01-25 10:46:21 -05:00