Commit graph

118 commits

Author SHA1 Message Date
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 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
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
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
kobewi d9f066d5fa Remove duplicate project settings definitions 2022-11-08 01:29:39 +01:00
Hendrik Brucker 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
Rémi Verschelde 18380817f2
Merge pull request #67274 from jbcolli2/Primitive_Tests
Unit Tests for all Primitive Meshes.
2022-11-02 22:37:06 +01:00
Rémi Verschelde 1bff95ad49
Merge pull request #66927 from jbcolli2/Path2d-Tests
Unit tests for Path2D class
2022-11-02 18:53:15 +01:00
Rémi Verschelde 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
jbcolli2 24a3556bea ArrayMesh unit tests 2022-10-24 15:15:05 -04:00
Wei Guo d7e39e313b Make window creation with custom position do not flash 2022-10-24 13:50:25 +08:00
jbcolli2 ad16187a4a PrimitiveMesh unit tests. 2022-10-14 12:23:36 -04:00
jbcolli2 92a466c162 Unit tests for Path2D module.
Co-authored-by: Matthew-Tave <tavematthew@gmail.com>
2022-10-12 22:00:34 -04:00
Ricardo Buring 532e378cd9 Expose registration of physics servers to GDExtension
This exposes PhysicsServer2DManager and PhysicsServer3DManager.
2022-09-07 15:05:46 +02:00
Rémi Verschelde c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +02:00
Hendrik Brucker ea0472fecf Refactor BitMap and add tests
Co-authored-by: Resul Çelik <resul_celik@hotmail.com>
2022-09-01 18:39:17 +02:00
Yuri Rubinsky 8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03:00
Yuri Sizov 6320a0fc18 Add ThemeDB, expose previously static Theme methods 2022-08-26 19:23:05 +03:00
Hendrik Brucker 36061c5dca Vector4/Vector4i: Add missing methods, tests and fix change of sign operator 2022-08-07 12:25:05 +02:00
jtorre39 667faa68e9 Add unit tests for all public methods in the SpriteFrames class 2022-08-04 14:27:14 +02:00
Rémi Verschelde 426240f18a
Merge pull request #50907 from codepatzer/quaternion_ut 2022-08-04 14:26:46 +02:00
Rémi Verschelde 29afda3fd5
Merge pull request #60736 from StrawbDev/audio-stream-sample-unit-test 2022-08-04 13:56:53 +02:00
codepatzer 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
StrawbDev 3c252d5c6d Add test cases for AudioStreamWAV 2022-08-04 13:24:33 +02:00
Timon Bestebreur 997f18f686 Add Unit Tests for InputEventKey 2022-08-04 12:59:13 +02:00
Rémi Verschelde 255e0770c4
Merge pull request #54325 from skimmedsquare/test-add-rid 2022-08-04 12:51:53 +02:00
Timon Bestebreur 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
Sean Kim 4706b975b6 Add unit tests for RID class. 2022-08-04 12:05:25 +02:00
Fabian Keller f242f9c738 Fix consistency of translated/scaled/rotated in Transform2D and Transform3D 2022-08-02 23:38:14 +02:00
Juan Linietsky 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
Hugo Locurcio 208435fb90
Add a test suite for OS 2022-07-29 01:55:43 +02:00
Hugo Locurcio 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
reduz 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
cabinboy1031 7730001390 Implemented tests for Plane getters and setters.
Added tests for intersection and plane-point methods.
2022-07-05 12:55:05 +02:00
reduz 45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
reduz 746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
reduz 8b7c7f5a75 Add a new HashMap implementation
Adds a new, cleaned up, HashMap implementation.

* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
  for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).

This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
Rémi Verschelde 5c52b30471
Merge pull request #60529 from timothyqiu/theme-validation 2022-05-02 10:49:14 +02:00
Aaron Franke 0ae00a07d6
Rename variable names for some singletons 2022-04-26 22:53:50 -05:00
Rémi Verschelde e9e2aaf812
Merge pull request #60513 from Calinou/default-font-add-msdf-mipmap
Add MSDF and mipmap generation project settings for the default font
2022-04-26 22:39:55 +02:00
Haoyu Qiu d8c04cda3a Validate theme type/item names 2022-04-26 19:54:43 +08:00
Hugo Locurcio 43c34bf611
Add MSDF and mipmap generation project settings for the default font
This can be used to improve Label3D and scaled Control appearance
in prototypes.
2022-04-25 16:47:44 +02:00
Paulb23 c1d445f1e5 Add inital TextEdit UnitTests 2022-04-22 21:09:48 +01:00
Paulb23 5e4e4967fe Use Input::push_input for tests plus extra mouse testing 2022-04-22 17:39:12 +01:00
Rémi Verschelde c99a1af0fb Remove unused legacy tests
They haven't been updated for years and still use the old MainLoop
basic framework instead of the new doctest one.

They're of dubious quality and best redone from scratch using the
new framework.
2022-04-07 00:38:44 +02:00
bruvzg 29199579f7
Add sub-pixel glyph positioning support. 2022-02-12 19:55:52 +02:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Hugo Locurcio a6e8cdae66
Add a unit test suite for Animation 2022-02-06 21:33:22 +01:00