Commit Graph

132 Commits

Author SHA1 Message Date
dbae37cc50 Fix global transform validity for Node2D and Control
Set global transform to invalid when changing transform

(cherry picked from commit 152572ac38)
2023-09-20 22:44:03 +02:00
ab4e89ecde Add HTTPClient unit tests 2023-06-21 11:53:55 +02:00
b54c3e7e5e Add initial 'NavigationObstacle' and 'NavigationRegion' tests 2023-06-14 22:24:37 +02:00
479f359ac4 Add unit test: mouse movement after slider release 2023-06-05 13:51:28 +02:00
c996863464 Streamline WorkerThreadPool tests and make them more robust 2023-05-17 17:33:08 -04:00
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
cdf9c33c35 add unit tests for Curve3D 2023-05-10 19:12:06 +02:00
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
e92adba19c Add initial navigation tests 2023-02-13 21:39:09 +01:00
ce6c290528 Add Unit Tests for Viewport InputEvent handling 2023-02-09 14:53:04 +01:00
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
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
23827d4303 Add Unit test for InputEventMouse 2023-01-29 14:09:53 +01:00
d9ceddd86b Add unit tests for Curve2D 2023-01-13 13:54:45 -03:00
2718a7b7d3 Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
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
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
b6e06038f8 Merge pull request #70396 from jainl28patel/VisualShader-unit-test 2022-12-26 15:13:56 +03:00
e4f4fb580e Add unit test for VisualShader 2022-12-26 16:52:07 +05:30
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
d9f066d5fa Remove duplicate project settings definitions 2022-11-08 01:29:39 +01:00
e62955b45b Add a test suite for Math:: namespace functions
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-11-04 03:08:08 +01:00
18380817f2 Merge pull request #67274 from jbcolli2/Primitive_Tests
Unit Tests for all Primitive Meshes.
2022-11-02 22:37:06 +01:00
1bff95ad49 Merge pull request #66927 from jbcolli2/Path2d-Tests
Unit tests for Path2D class
2022-11-02 18:53:15 +01:00
1211f9d9b6 Merge pull request #67800 from jbcolli2/ArrayMesh-UnitTests
Unit Tests for ArrayMesh class for Issue #43440
2022-10-31 11:58:28 +01:00
24a3556bea ArrayMesh unit tests 2022-10-24 15:15:05 -04:00
d7e39e313b Make window creation with custom position do not flash 2022-10-24 13:50:25 +08:00
ad16187a4a PrimitiveMesh unit tests. 2022-10-14 12:23:36 -04:00
92a466c162 Unit tests for Path2D module.
Co-authored-by: Matthew-Tave <tavematthew@gmail.com>
2022-10-12 22:00:34 -04:00
532e378cd9 Expose registration of physics servers to GDExtension
This exposes PhysicsServer2DManager and PhysicsServer3DManager.
2022-09-07 15:05:46 +02:00
c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +02:00
ea0472fecf Refactor BitMap and add tests
Co-authored-by: Resul Çelik <resul_celik@hotmail.com>
2022-09-01 18:39:17 +02:00
8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03:00
6320a0fc18 Add ThemeDB, expose previously static Theme methods 2022-08-26 19:23:05 +03:00
36061c5dca Vector4/Vector4i: Add missing methods, tests and fix change of sign operator 2022-08-07 12:25:05 +02:00
667faa68e9 Add unit tests for all public methods in the SpriteFrames class 2022-08-04 14:27:14 +02:00
426240f18a Merge pull request #50907 from codepatzer/quaternion_ut 2022-08-04 14:26:46 +02:00
29afda3fd5 Merge pull request #60736 from StrawbDev/audio-stream-sample-unit-test 2022-08-04 13:56:53 +02:00
d0cb0ff248 Add tests file for Quaternion unit tests, with initial UTs
- Test constructors and quaternion product.
- Add test case for Axis-Angle construction about Y-axis.
- Add test case for xform of i-, j-, & k-unit vectors.
- Add test case for construction from Basis.
- Add test case for xform of arbitrary vector.
- Add stress test case: many Quaternions xform many vectors.
- Make comments consistent with style guide.
2022-08-04 13:56:04 +02:00
3c252d5c6d Add test cases for AudioStreamWAV 2022-08-04 13:24:33 +02:00
997f18f686 Add Unit Tests for InputEventKey 2022-08-04 12:59:13 +02:00
255e0770c4 Merge pull request #54325 from skimmedsquare/test-add-rid 2022-08-04 12:51:53 +02:00
92b392e3db Add unit tests for Shortcut
Next to that, add entry for the test file in test_main.cpp.

These test cases test the basic functionality of the shortcut module.
2022-08-04 12:18:36 +02:00
4706b975b6 Add unit tests for RID class. 2022-08-04 12:05:25 +02:00
f242f9c738 Fix consistency of translated/scaled/rotated in Transform2D and Transform3D 2022-08-02 23:38:14 +02:00
0dd65378e7 Add support for command-line user arguments.
Implements the standard Unix double dash (--) commandline argument:
* Arguments after a double dash (--) are ignored by Godot and stored for the user.
* User can access them via `OS.get_cmdline_user_args()`

Example:

`godot.exe scene_to_run.tscn --fullscreen -- --start-level 2`
2022-08-01 00:56:59 +02:00
208435fb90 Add a test suite for OS 2022-07-29 01:55:43 +02:00
4b42379c8f Rename RenderingServer global shader uniform methods to be more explicit
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +02:00
67a260d63f Implement a Worker ThreadPool
This PR implements a worked thread pool. It uses a fixed amount of threads in a pool and allows scheduling tasks
that can be run on threads (and then waited for). It satisfies the following use cases:

* HTML5 thread count is fixed (and similar restrictions are known in consoles) so we need to reuse threads.
* Thread spawning is slow in general, so reusing threads is faster anyway.
* This implementation supports recursive waiting for tasks, making it less prone to deadlocks if threads from the pool also run tasks.

After this is approved and merged, subsequent PRs will be needed to replace the ThreadWorkPool usage by this class.
2022-07-22 11:46:48 +02:00
7730001390 Implemented tests for Plane getters and setters.
Added tests for intersection and plane-point methods.
2022-07-05 12:55:05 +02:00