Commit graph

532 commits

Author SHA1 Message Date
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
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
Jan Haller
83026126d4 Add tests to ensure bound methods and signals are valid identifiers 2023-01-23 21:19:57 +01:00
bruvzg
daad4aed62
Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Rémi Verschelde
65883cc73b
Merge pull request #71598 from bruvzg/gdscript_bidi_override
Implement BiDi override mode for GDScript source.
2023-01-19 19:33:18 +01:00
Rémi Verschelde
8b92316368
Merge pull request #71565 from RedworkDE/doc-arraymesh-add-surface
Fix LOD sort order; checks in add_surface; and document all parameters of `ArrayMesh::add_surface_from_arrays`
2023-01-19 19:32:37 +01:00
bruvzg
db7d8c2d87
[GDExtension] Expose some low level functions and String operators. 2023-01-19 12:50:49 +02:00
RedworkDE
be4eb3bbdd Fix LOD sort order; checks in add_surface; and document all parameters of ArrayMesh::add_surface_from_arrays
Also clarify some related documentation and expose the misssing `ArrayFormat::ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`
2023-01-19 10:30:25 +01:00
bruvzg
5361ec9f43
Implement BiDi override mode for GDScript source. 2023-01-18 19:22:20 +02:00
kobewi
b427d3585c Allow unindent without selection 2023-01-18 17:05:15 +01:00
Rémi Verschelde
517b7fc468
Merge pull request #71308 from hcoura/test-curve-2d
Add unit tests for Curve2D
2023-01-16 09:25:15 +01:00
Raul Santos
7560340ef6
Rename center method to get_center in Plane. 2023-01-15 17:18:50 +01:00
Paulb23
1aac10d73d Fixed adding extra quote when completing strings 2023-01-14 15:28:22 +00:00
Marius Hanl
d2f246806c Added more node tests
Testing the following functions:
- reparent
- duplicate
- replace_by (also with keeping groups)
2023-01-14 00:23:58 +01:00
Henrique Coura
d9ceddd86b Add unit tests for Curve2D 2023-01-13 13:54:45 -03:00
Rémi Verschelde
6a86dfad29
Fix typos with codespell
Also includes #71080.

Co-authored-by: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
2023-01-09 08:39:07 +01:00
Juan Linietsky
2b815df3c1 Use BitField<> in core type masks
* 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-08 22:17:40 +01:00
bruvzg
2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
Rémi Verschelde
798582acf0
Merge pull request #65609 from dalexeev/animated-sprite
`AnimatedSprite{2D,3D}` improvements
2023-01-05 15:00:31 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
Danil Alexeev
0d25d8e7fc
AnimatedSprite{2D,3D} improvements
* Add support for individual frame duration to `SpriteFrames`.
* Various minor improvements.
2023-01-05 13:13:25 +03:00
Rémi Verschelde
565ae3b767
Merge pull request #67694 from aaronfranke/its-time
Remove duplicate Month and Weekday enums
2023-01-03 23:21:19 +01:00
Rémi Verschelde
5e78f0f782
Merge pull request #70840 from MewPurPur/get-point-count-instead-of-points
Rename `get_points_count()` to `get_point_count()` in Gradient
2023-01-03 15:46:18 +01:00
Rémi Verschelde
7fb6d70398
Merge pull request #70152 from Maran23/4-x-tests-for-node
Initial tests for node
2023-01-03 12:40:44 +01:00
Marius Hanl
eec42f1aab Add initial tests for Node
- Test simple and complex cases for:
-> add, remove, move, get, find, count, is_inside_tree
-> name, nodepath
-> verify the scene tree
- Simple tests for the processing setup
2023-01-03 07:50:20 +01:00
VolTer
1af833be95 Rename get_points_count() to get_point_count() internally 2023-01-02 16:52:05 +02:00
Marius Hanl
b9be3ce75e Add tests for signals
- Adding signals
- Emitting signals
2022-12-29 16:07:45 +01:00
Aaron Franke
8d7d1b0bb2
Remove duplicate Month and Weekday enums
Well, they were duplicately-exposed, but triplicately-defined.
2022-12-26 15:16:25 -06:00
Yuri Rubinsky
b6e06038f8
Merge pull request #70396 from jainl28patel/VisualShader-unit-test 2022-12-26 15:13:56 +03:00
jainl28patel
e4f4fb580e Add unit test for VisualShader 2022-12-26 16:52:07 +05:30
Marius Hanl
5aa243f9da Added the possibility to define a default value in ProjectSettings.get_setting(), which is used when no setting is set.
Also added tests for the project settings.

Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-12-21 19:49:57 +01:00
Paulb23
29f7bea241 Fix autocomplete with autobrace completion not adding closing pair 2022-12-19 14:20:52 +00:00