summaryrefslogtreecommitdiff
path: root/main/tests
AgeCommit message (Collapse)Author
2020-05-25Merge pull request #38887 from AndreaCatania/oahash_impRémi Verschelde
OAHashMap crash fix and copy feature.
2020-05-25- Make sure it's impossible to initialize an OAHashMap with 0 capacity ↵Andrea Catania
(would cause division by 0) - Added possibility to copy an OAHashMap - Added unit tests This code is generously donated by IMVU.
2020-05-22Fix condition in ClassDB tests that should returnIgnacio Etcheverry
Also changed the name of the test macros to be clearer.
2020-05-18Merge pull request #38723 from neikeq/initial-classdb-testRémi Verschelde
Added tests for ClassDB
2020-05-18Fix leaks and crashes in OAHashMapPedro J. Estébanez
This changes the way the lifespan of items is managed to be consistent. Bonus: Simplify cases of destroy-then-emplace.
2020-05-16Added tests for ClassDBIgnacio Etcheverry
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-14Remove redundant void argument listsRémi Verschelde
Using clang-tidy's `modernize-redundant-void-arg`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html
2020-05-14Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde
Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2020-05-10New lightmapperJuan Linietsky
-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)
2020-05-10Revert "Renamed plane's d to distance"Rémi Verschelde
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.
2020-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
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.
2020-05-10Renamed plane's d to distanceMarcus Elg
2020-04-17Implement global and per instance shader uniforms.Juan Linietsky
Adds two keywords to shader language for uniforms: -'global' -'instance' This allows them to reference values outside the material.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
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.
2020-03-28More server renames for consistency after #37361Rémi Verschelde
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-27Renamed 2D and 3D nodes to make their types explicitJuan Linietsky
Fixes #30736.
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-03-26Added a Window node, and made it the scene root.Juan Linietsky
Still a lot of work to do.
2020-03-26Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky
2020-03-24Remove unused classes and stray headersRémi Verschelde
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 ```
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
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`.
2020-03-04Change when we can ERR_FAIL_COND and ERR_FAIL_CONV_V to static_assertMateo Dev .59
2020-02-27Renamed PlaneShape to WorldMarginShapeAndrea Catania
2020-02-23Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde
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.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-14Fix various GCC compilation warnings after Vulkan mergeRémi Verschelde
Part of #36132.
2020-02-11Implementation of 'struct' for shadersYuri Roubinsky
2020-02-11Fix Vector3 ambiguities and out of bounds init.bruvzg
2020-02-11Texture refactorJuan Linietsky
-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
2020-02-07Use modules_enabled.gen.h to improve inter dependency checksRémi Verschelde
- 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.
2020-01-08GDScript: enable type checks on release modeGeorge Marques
Also make builtin GDScript functions report return type as Variant in release so type is converted when needed.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-11-07Merge pull request #30556 from kawa-yoiko/astar-directedRémi Verschelde
Improve support for directed graphs in A*; docs update included
2019-09-28Add stress test between A* and Floyd-WarshallShiqing
2019-09-28Reduce memory usage for edges in A* and add testsShiqing
2019-09-21Implement backward shift deletion for OAHashMapShiqing
2019-08-27allow to reserve space in OAHashMap explicitly and also in AStar.Robin Hübner
* also handle overflow occurring in _get_probe_length
2019-08-12Remove redundant author doc commentsIAmActuallyCthulhu
2019-08-12Merge pull request #31290 from nekomatata/fix-test-regex-disabledRémi Verschelde
Fixed link errors when building in debug with RegEx module disabled
2019-08-11Fixed link errors when building in debug with option module_regex_enabled=noPouleyKetchoupp
2019-08-09Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "main" and "servers" directoriesMichael Alexsander Silva Dias
2019-07-23Added count method to StringChaosus
2019-07-15Implemented local shader arraysChaosus
2019-06-26Some code changed with Clang-Tidyqarmin