Commit Graph

108 Commits

Author SHA1 Message Date
Sarav Noor Singh dd9c8d85fa
Add a test suite for Array 2021-02-19 17:40:57 +01:00
Rémi Verschelde 8eaea1db53
Merge pull request #45032 from neikeq/classdb-tests-for-44856
Add ClassDB tests to look for core API deps on editor API
2021-02-18 15:16:52 +01:00
Aaron Franke 7d9ad2b845
Use Vector3.UP as a default value for look_at's up vector 2021-02-16 18:33:23 -05:00
sps1112 f71f8c8c0b Add Unit Tests for Variant Assignment 2021-02-11 17:27:24 +05:30
reduz 8b19ffd810 Make Servers truly Thread Safe
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread).
-RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault.
-Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory).
-3D physics server changed to be made multithread friendly.
-Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads.
-Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
2021-02-10 13:21:46 -03:00
Manolis Papadeas 7a918bacca Add a test suite for the Image class 2021-02-06 01:09:02 +02:00
Rémi Verschelde 5525cd85c6
Merge pull request #45315 from RandomShaper/modernize_thread
Modernize Thread
2021-01-31 15:24:56 +01:00
Rémi Verschelde 46de553473
Merge pull request #45519 from aaronfranke/physics-real_t
Use real_t in physics code
2021-01-29 16:31:47 +01:00
Pedro J. Estébanez 99fe462452 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-01-29 12:02:13 +01:00
Rémi Verschelde fbb4742377
Merge pull request #45411 from a-ivanov/more-object-tests
Unit tests for Object creation and property getter/setter
2021-01-29 00:58:54 +01:00
Aaron Franke cb9fc117d1
Use real_t in physics code 2021-01-28 18:15:42 -05:00
Anton Ivanov db0f3da2c4
Unit tests for Object creation and property getter/setter 2021-01-29 01:53:28 +03:00
Aaron Franke e829b7aee4
Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28 07:45:01 -05:00
Aaron Franke a3e3bf8227
Make hex_to_int and bin_to_int handle the prefix automatically
Also add BinToInt to C#
2021-01-28 07:43:53 -05:00
Yuri Roubinsky 38a5d22079 Renamed String.ord_at to unicode_at 2021-01-26 20:36:12 +03:00
Rémi Verschelde 6ddfc8e718
Merge pull request #44797 from a-ivanov/marshall-core-unit-tests
Marshall core unit tests
2021-01-24 20:41:57 +01:00
Anton Ivanov 69b554e92d
Unit tests for encoding/decoding Variant 2021-01-24 17:15:07 +03:00
Anton Ivanov 8aed1ee8f7
Unit tests for encoding/decoding of base types 2021-01-24 17:15:07 +03:00
Rémi Verschelde 1218441b16
Merge pull request #44514 from madmiraal/split-os-execute
Split OS::execute into two methods
2021-01-12 16:17:04 +01:00
AndreaCatania 5ba60c17dd Add function `LocalVector::remove_unordered`
Added LocalVector unit tests.
2021-01-11 13:47:31 +01:00
Marcel Admiraal 2a74b388d0 Split OS::execute into two methods
1. execute(): Executes a command and returns the results.
2. create_process(): Creates a new process and returns the new process' id.
2021-01-09 10:03:23 +00:00
Ignacio Etcheverry fafdc0b0c1 Add ClassDB tests to look for core API deps on editor API
The ClassDB tests will detect when the core API has dependencies on
the editor API, which is not allowed.

This should prevent or warn early about issues like #44856
2021-01-09 00:18:03 +01:00
Andrii Doroshenko (Xrayez) faab6ff97a Use comma over `<<` operator for all unit test logging
The comma operator should be preferred now according to doctest.

Moved macro aliases from `ClassDB` tests to `test_macros.h`, because those
are also used in `TextServer` tests.
2021-01-08 14:15:43 +02:00
Rémi Verschelde 7917cb12df
doctest: Update to 2.4.4
Make ClassDB test macros enforce their msg to be constructed as String,
since doctest 2.4.2 changes the message passing to vararg.
2021-01-08 11:37:36 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Marcus Brummer e455ca2f2f Added Geometry2D unit tests 2020-12-30 21:11:09 +01:00
Andrii Doroshenko (Xrayez) 21319feb9c Increase number of sections in object files for tests with MSVC 2020-12-30 15:48:23 +02:00
Rémi Verschelde 6cebb8c117
Merge pull request #44586 from madmiraal/rename-stepify
Rename Math::stepify to snapped
2020-12-28 21:46:43 +01:00
Rémi Verschelde 9addcb7603
Merge pull request #44751 from madmiraal/rename-rect-grow_margin
Rename Rect2 and Rect2i grow_margin() to grow_side()
2020-12-28 15:56:14 +01:00
Rémi Verschelde e4c0572385
Merge pull request #44593 from madmiraal/rename-mainloop-methods
Rename MainLoop methods to match Node methods
2020-12-28 14:44:28 +01:00
Marcel Admiraal b743a2ef3c Rename Math::stepify to snapped 2020-12-28 13:01:30 +00:00
Marcel Admiraal b628912af0 Rename Rect2 and Rect2i grow_margin() to grow_side() 2020-12-28 12:47:33 +00:00
Rémi Verschelde 18fefe700f
Merge pull request #44687 from Xrayez/tests-data-rel-path
Use relative path to executable for loading test data
2020-12-28 13:34:19 +01:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Andrii Doroshenko (Xrayez) f018ae74f9 Use relative path to executable for loading test data
Fixes crash if tests are run outside the Godot root directory.
2020-12-25 20:28:28 +02:00
Marcel Admiraal 4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
Marcel Admiraal d9e9eb8d04 Rename MainLoop methods to match Node methods 2020-12-22 12:34:57 +00:00
Marco Cognetta 900e55eb70 simplify randi_range 2020-12-21 20:25:58 -05:00
reduz 37c6434e16 Add a paged array template
Used for reusable stacks, or filling arrays from multiple threads efficiently.
2020-12-21 15:06:50 -03:00
Andrii Doroshenko (Xrayez) b12a6cb431 Add unit test for `RandomNumberGenerator`
This covers RNG functionality completely.

Co-authored-by: @vinayakmtiwari.
2020-12-21 03:12:53 +02:00
Rémi Verschelde f3d1fceb16
Merge pull request #42136 from Xrayez/test-list-api
Add test cases for the `List` to cover public methods
2020-12-20 21:15:55 +01:00
Marcel Admiraal 2df9a8ccad Rename Rect2 and Rect2i clip() to intersection() 2020-12-19 12:59:08 +00:00
reduz d2302f53d6 Implement automatic LOD (Level of Detail)
-Happens on import by default for all models
-Just works (tm)
-Biasing can be later adjusted per node or per viewport (as well as globally)
-Disabled AABB.get_support test because its broken
2020-12-18 15:48:03 +01:00
Andrii Doroshenko (Xrayez) ed7014c67a Add test suite for `FileAccess` 2020-12-11 16:05:18 +02:00
Andrii Doroshenko (Xrayez) 932acad53f Add test suite for `RandomNumberGenerator` 2020-12-07 13:51:03 +02:00
Fabio Alessandrelli 502ff74fee
Merge pull request #43536 from jonbonazza/hmac
feat: HMAC support in Crypto APIs
2020-12-03 11:08:16 +01:00
Jon Bonazza d5925fd522 feat: HMAC support in Crypto APIs 2020-11-26 18:39:56 -08:00
bruvzg 493da99269
[Complex Text Layouts] Implement TextServer interface. Implement Fallback TextServer. 2020-11-26 13:55:26 +02:00
Rémi Verschelde a248e6f8c3
Merge pull request #43781 from MaxMutantMayer/regex_unit_tests
Move and add new RegEx test cases
2020-11-23 10:07:07 +01:00
Rémi Verschelde 6221210c6c
Merge pull request #43727 from Calinou/test-add-aabb
Add a test suite for AABB
2020-11-23 09:30:44 +01:00