summaryrefslogtreecommitdiffstats
path: root/main/tests
Commit message (Collapse)AuthorAgeFilesLines
* Move `tests` to the top-level directoryAndrii Doroshenko (Xrayez)2020-07-2629-6188/+0
|
* t Add unit testing to Godot using DocTest and added to GitHub Actions CIRevoluPowered2020-07-245-1281/+839
| | | | | | | | | | Implements exit codes into the engine so tests can return their statuses. Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically. Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header. This lowers the complexity of running the unit tests and even for physics should be possible to implement such a fix.
* New GDScript tokenizer and parserGeorge Marques2020-07-201-915/+67
| | | | | | | | | | Sometimes to fix something you have to break it first. This get GDScript mostly working with the new tokenizer and parser but a lot of things isn't working yet. It compiles and it's usable, and that should be enough for now. Don't worry: other huge commits will come after this.
* Commit other files changed by file_format.shAaron Franke2020-07-131-4/+4
|
* Add override keywords.Marcel Admiraal2020-07-102-7/+7
|
* Fix string test code for MinGWAaron Franke2020-07-051-1/+4
|
* Merge pull request #38713 from aaronfranke/string-64bitRémi Verschelde2020-07-011-1/+1
|\ | | | | Make all String integer conversion methods be 64-bit
| * Remove 32-bit String to_int methodAaron Franke2020-06-031-1/+1
| |
* | Style: Fix copyright headersRémi Verschelde2020-06-252-2/+2
| |
* | - Added more euler rotation orders support.Andrea Catania2020-06-123-0/+371
|/ | | | | | | | - Fixed floating point issue on the old one. - Fixed the equation on the get_euler_yxz function. - Added unit tests. This work has been kindly sponsored by IMVU.
* Merge pull request #39051 from Xrayez/geometry-splitRémi Verschelde2020-05-293-12/+13
|\ | | | | Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
| * Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)2020-05-273-12/+13
| | | | | | | | Extra `_2d` suffixes are removed from 2D methods accoringly.
* | Merge pull request #28289 from aaronfranke/gridRémi Verschelde2020-05-261-1/+1
|\ \ | |/ |/| Dynamic infinite 3D grid
| * Dynamic infinite 3D gridAaron Franke2020-05-221-1/+1
| | | | | | | | Well, infinite for all intents and purposes.
* | Merge pull request #38887 from AndreaCatania/oahash_impRémi Verschelde2020-05-251-0/+83
|\ \ | |/ |/| OAHashMap crash fix and copy feature.
| * - Make sure it's impossible to initialize an OAHashMap with 0 capacity ↵Andrea Catania2020-05-251-0/+83
| | | | | | | | | | | | | | | | | | (would cause division by 0) - Added possibility to copy an OAHashMap - Added unit tests This code is generously donated by IMVU.
* | Fix condition in ClassDB tests that should returnIgnacio Etcheverry2020-05-221-34/+34
|/ | | | Also changed the name of the test macros to be clearer.
* Merge pull request #38723 from neikeq/initial-classdb-testRémi Verschelde2020-05-183-0/+930
|\ | | | | Added tests for ClassDB
| * Added tests for ClassDBIgnacio Etcheverry2020-05-163-0/+930
| |
* | Fix leaks and crashes in OAHashMapPedro J. Estébanez2020-05-181-0/+58
|/ | | | | | This changes the way the lifespan of items is managed to be consistent. Bonus: Simplify cases of destroy-then-emplace.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-149-109/+205
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-1410-0/+11
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-1411-267/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Remove redundant void argument listsRémi Verschelde2020-05-143-3/+3
| | | | | Using clang-tidy's `modernize-redundant-void-arg`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html
* Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde2020-05-141-1/+1
| | | | | Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
* New lightmapperJuan Linietsky2020-05-101-2/+51
| | | | | | | -Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
* Revert "Renamed plane's d to distance"Rémi Verschelde2020-05-101-1/+1
| | | | | | | This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3. This was wrong, `d` is not a distance but the `d` constant in the parametric equation `ax + by + cz = d` describing the plane.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-102-26/+57
| | | | Part of #33027.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-102-12/+24
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Renamed plane's d to distanceMarcus Elg2020-05-101-1/+1
|
* Implement global and per instance shader uniforms.Juan Linietsky2020-04-171-1/+1
| | | | | | | | Adds two keywords to shader language for uniforms: -'global' -'instance' This allows them to reference values outside the material.
* Replace NULL with nullptrlupoDharkael2020-04-028-31/+31
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* More server renames for consistency after #37361Rémi Verschelde2020-03-283-17/+17
|
* Renaming of servers for coherency.Juan Linietsky2020-03-275-122/+122
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Renamed 2D and 3D nodes to make their types explicitJuan Linietsky2020-03-271-2/+2
| | | | Fixes #30736.
* Popups are now windows also (broken!)Juan Linietsky2020-03-261-1/+1
|
* Added a Window node, and made it the scene root.Juan Linietsky2020-03-261-1/+1
| | | | Still a lot of work to do.
* Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky2020-03-263-3/+6
|
* Remove unused classes and stray headersRémi Verschelde2020-03-246-5/+11
| | | | | | | | Found by reviewing headers with 1 or less matching includes: ``` find -name thirdparty -prune -o -name "*.h" -exec basename {} \; | sort -u > headers for header in $(cat headers); do echo "$header: "; rg -l "#include \"(.*/)?$header\"" | wc -l; done > list-includes ```
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-172-3/+3
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Change when we can ERR_FAIL_COND and ERR_FAIL_CONV_V to static_assertMateo Dev .592020-03-041-1/+1
|
* Renamed PlaneShape to WorldMarginShapeAndrea Catania2020-02-271-3/+3
|
* Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde2020-02-231-1/+1
| | | | | | | | | | This attribute is now part of the standard we target so we no longer need compiler-specific hacks. Also enables -Wimplicit-fallthrough for Clang now that we can properly support it. It's already on by default for GCC's -Wextra. Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-185-26/+18
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Fix various GCC compilation warnings after Vulkan mergeRémi Verschelde2020-02-141-0/+3
| | | | Part of #36132.
* Implementation of 'struct' for shadersYuri Roubinsky2020-02-111-0/+3
|
* Fix Vector3 ambiguities and out of bounds init.bruvzg2020-02-111-2/+2
|
* Texture refactorJuan Linietsky2020-02-111-6/+6
| | | | | | | | -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
* Use modules_enabled.gen.h to improve inter dependency checksRémi Verschelde2020-02-072-7/+12
| | | | | | | - Fix build with gdscript module disabled. Fixes #31011. - Remove unused `gdscript` compile option. - Fix build with regex module disabled. - Fix ImageLoaderSVG to forward declare thirdparty structs.