Commit Graph

173 Commits

Author SHA1 Message Date
Rémi Verschelde 4f02b37f70
Merge pull request #95218 from MylesScholz/unit-tests
Add unit tests for `StyleBoxTexture`
2024-08-27 22:27:39 +02:00
MylesScholz cdaba941d5 StyleBoxTexture unit tests
Capitalization fix in test_style_box_texture.h

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>

Newline fix in test_style_box_texture.h

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-08-08 11:36:34 -07:00
aaronp64 040f241f39 Improve Tree performance
Added TreeItem::last_child to avoid needing to iterate through all children to get to the end.  This mainly helps in cases where one TreeItem has many children (1000s), and new children are added to the end, as each add had to iterate through all previously added children.
2024-07-26 11:32:45 -04:00
Raul Santos c3a054fa0b
Fix PathFollow tests, Add forward vector test to PathFollow3D 2024-07-20 19:09:42 +02:00
A Thousand Ships 832695eb2c
[Tests] Fix various unit tests on minimal builds 2024-07-18 15:17:28 +02:00
gaven fb485e3552
Add unit test cases for ImageTexture3D 2024-06-12 10:32:09 +02:00
Adriano Orioli edd2e6e37f
make InstancePlaceholder in charge of node reference resolution 2024-05-28 11:51:49 +02:00
Paulo Poiati a3769c0edc Properly set window class in Wayland 2024-05-22 10:42:12 -03:00
A Thousand Ships a0dbdcc3ab
Replace `find` with `contains/has` where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde e63252b421
Merge pull request #90705 from AThousandShips/foreach_list
Reduce and prevent unnecessary random-access to `List`
2024-05-07 09:04:44 +02:00
Shashank C 7a6f8452bd add timer node tests 2024-05-06 09:39:27 +05:30
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
A Thousand Ships abe7ec1543
Fix some build errors with `disable_3d=yes` 2024-04-16 14:25:36 +02:00
Rémi Verschelde 5bd2af6c38
Merge pull request #90313 from Nazarwadim/unit_tests_oa_hash_map
Add unit tests for `OAHashMap`
2024-04-10 17:49:29 +02:00
Rémi Verschelde 4b813386d2
Merge pull request #88614 from ramadm/test-camera-2d
Add unit tests for Camera2D
2024-04-10 14:21:43 +02:00
RevoluPowered 65d076b78d
Add unit test for resolve_hostname 2024-04-10 14:19:04 +02:00
nazarii 0c8e1c69f8 Add unit tests for OAHashMap 2024-04-10 07:51:06 +03:00
A Thousand Ships 59bcc2888c
Add methods to get argument count of methods
Added to:
* `Callable`s
* `Object`s
* `ClassDB`
* `Script(Instance)`s
2024-03-10 11:02:43 +01:00
Sofox f249667dc8 Fixed MERGE_ALL commit from repeating actions 2024-03-05 23:40:26 +00:00
A Thousand Ships 3a707b1f54
Fix some additional errors with 3D disabled
* Disabled 2D navigation tests as they do not work
* Disabled tests for primitive meshes
* Unbound some `Mesh` methods that rely on 3D resources
* Unexposed `World3D` as it depends on physics (and isn't useful)
* Unexposed some `Viewport` vrs related properties that had unexposed
  methods
2024-02-23 20:58:56 +01:00
A Thousand Ships f06222e487
[Physics] Fix export with 3D disabled 2024-02-22 16:23:48 +01:00
Rama Del Maestro 4f06ddfeae Add unit tests for Camera2D 2024-02-21 16:55:16 -08:00
b 6dbbc24bdf Added ImageTexture unit tests 2024-02-19 11:15:04 -06:00
A Thousand Ships d5212b4b7d
[Tests] Fix test regression without editor 2024-02-17 18:06:57 +01:00
Rémi Verschelde 6226388bac
Merge pull request #86874 from AThousandShips/no_3d_fix
Fix some build errors with `disable_3d=yes`
2024-01-08 11:59:31 +01:00
A Thousand Ships c6a1ae7875
Fix some build errors with `disable_3d=Yes`
* Some tests were incorrectly included
* SCU builds with animation
* Animation `switch`
2024-01-07 00:44:33 +01:00
HolonProduction af4cbaf751 Add unit test runner for autocompletion 2024-01-05 17:49:51 +01:00
CHM 2e35ecce9c Add tests for Camera3D 2023-11-13 19:04:50 +08:00
smix8 0ee7e3102b Add 2D navigation mesh baking
Adds 2D navigation mesh baking.
2023-09-25 19:48:14 +02:00
Aaron Franke 22e2696767
Add unit tests for type_convert Variant utility function 2023-09-08 10:13:22 -05:00
Yuri Sizov 58126e479c Introduce the concept of global theme contexts
This commit adds the default theme context, which replaces
the need to manually check the project and the default theme
all the time; simplifies related code.

It also adds framework for custom theme contexts, to be used
by the editor. Custom contexts can be attached to any node,
and not necessarily a GUI/Window node. Contexts do no break
theme inheritance and only define which global themes a node
uses as a fallback.

Contexts propagate NOTIFICATION_THEME_CHANGED when one of their
global themes changes. This ensures that global themes act just
like themes assigned to individual nodes and can be previewed
live in the editor.
2023-09-06 19:40:43 +02:00
Yuri Sizov 4328ffcc79 Fix ThemeDB initialization in tests
Also fixes class name shadowing in Viewport/Window tests.
2023-09-04 18:07:16 +02:00
Rémi Verschelde 2c0a74a149
Merge pull request #80105 from Sauermann/fix-global-transform
Fix global transform validity for `Node2D` and `Control`
2023-08-28 12:03:53 +02:00
Pawel Lampe 0954ed0283 Suppress expected errors in navi-related unit tests, #80616 2023-08-22 19:33:38 +02:00
Markus Sauermann 59c13fea5d Fix nodes receiving mouse events in black bars of `Window`
Previously for InputEvents there was no distinction between
Window-area and Viewport-area.
This was problematic in cases where stretching was used and the Window
contained black bars at the sides of the Viewport.
This PR separates the area of Window and Viewport regarding InputEvents.
2023-08-09 12:34:22 +02:00
Markus Sauermann 152572ac38 Fix global transform validity for `Node2D` and `Control`
Set global transform to invalid when changing transform
2023-08-08 12:22:55 +02:00
Johan Aires Rastén 6e1f68109b Support shader preprocessor concatenation symbol 2023-08-08 10:56:20 +02:00
Rémi Verschelde 3532661a66
Merge pull request #79440 from sepTN/test-packed-scene
Add unit tests for PackedScene
2023-08-07 14:46:38 +02:00
Rémi Verschelde 66e40e402a
Merge pull request #79331 from azuloo/translation-server-test-suite
Add a test suite for TranslationServer
2023-08-07 14:45:24 +02:00
Septian cd94f9ad08 Add unit tests for PackedScene 2023-08-06 23:51:31 +07:00
Miguel Pereira c2ad5ca435 Added tests to InputEvent 2023-07-17 17:48:34 +02:00
azuloo dd0bd90865 Add a test suite for TranslationServer 2023-07-11 14:30:53 +03:00
angel-721 ab4e89ecde
Add HTTPClient unit tests 2023-06-21 11:53:55 +02:00
Pawel Lampe b54c3e7e5e Add initial 'NavigationObstacle' and 'NavigationRegion' tests 2023-06-14 22:24:37 +02:00
Markus Sauermann 479f359ac4 Add unit test: mouse movement after slider release 2023-06-05 13:51:28 +02:00
myaaaaaaaaa c996863464 Streamline WorkerThreadPool tests and make them more robust 2023-05-17 17:33:08 -04: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
Alex Drozd cdf9c33c35 add unit tests for Curve3D 2023-05-10 19:12:06 +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
Pawel Lampe e92adba19c Add initial navigation tests 2023-02-13 21:39:09 +01:00