aboutsummaryrefslogtreecommitdiff
path: root/src/unittest
AgeCommit message (Collapse)Author
2023-01-12Increase `ftos` precision (#13141)Jude Melton-Houghton
2022-11-24Rename "mod metadata" to "mod storage" everywhereJude Melton-Houghton
2022-11-15Add MetaDataRef:get_keys (#12841)Jude Melton-Houghton
2022-11-10Add mod storage PostgreSQL backendJude Melton-Houghton
2022-11-10Improve testListModsJude Melton-Houghton
2022-11-09Fix typos and en_US/en_GB inconsistency in various files (#12902)Abdou-31
2022-10-13Speed up find_nodes_in_area (#12845)Jude Melton-Houghton
2022-10-13Test on-lighting node param1 in lighting testJude Melton-Houghton
2022-10-09Optimize lighting calculation (#12797)Jude Melton-Houghton
2022-09-27Add unittests for item movement code (#11885)savilli
2022-09-26Avoid duplication of mod metadata in memory (#12562)Jude Melton-Houghton
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-26Modify PUC Lua to wrap C++ exceptions (#12445)Jude Melton-Houghton
2022-09-26Add lighting test and benchmark (#12802)Jude Melton-Houghton
2022-09-06Code optimizations / refactor (#12704)Herman Semenov
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com> Co-authored-by: sfan5 <sfan5@live.de>
2022-07-29Fix media overriding regression (#12602)Lars Müller
2022-06-20Re-order sound-related code (#12382)SmallJoker
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated 'fade' and 'pitch' values on server-side where only one was used anyway. SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included. Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the future. Per-type version numbers are kept for now as a safety rope in a special case.
2022-06-03fix integer overflow in mapgen (#11641)JosiahWI
* fix integer overflow in mapgen Some calculations involving the magic seed had overflow because the result of an intermediate arithmetic step could not fit in an s32. By making the magic seed unsigned, the other operand in the equation will be cast to unsigned, and possibly other operands or intermediate operands. This will result in unexpected behavior if an operand is negative, which is technically possible, but logically should not happen. * comment noise2d bitshift While working through the code I was momentarily concerned that the right bitshift in noise2d could fill ones in some cases. It turns out that with signed integers, this is indeed true, but this one is shifting an unsigned integer, so the behavior is as expected. I put a comment here to clarify this, in case someone else wonders the same thing down the line. * noise2d and noise3d unittests I have added 3 tests each for noise2d and noise3d, testing all zero inputs, a very large seed (case which caused UB in the old implementation) and some fun primes I picked for no particular reason. This should be sufficient to demonstrate that the behavior of the new implementation has not changed. I used uniform initialization because it is a good feature of C++11. Please do not explode. * uncomment the noise2d bitshift This reverts commit 583b77ee9f1ad6bb77340ebb5ba51eb9a88ff51c. It's a well-defined language semantic; it doesn't need to be commented. * code cleanliness
2022-05-22Replace all uses of core::list with std::list (#12313)paradust7
2022-05-21Improve testSerializeJsonString unit testssfan5
this also removes the requirement that / is escaped, there is no reason for doing so.
2022-05-18Use std::map instead of core::map (#12301)paradust7
2022-04-08Don't test overflow behavior for VoxelArea extentsShadowNinja
2022-04-08Remove duplicate test for trimShadowNinja
2022-04-08Update directory name sanitizationShadowNinja
Only ASCII spaces have to be handles specially, and leading spaces are also disallowed.
2022-04-08Add tests for sanitizeDirNameShadowNinja
2022-04-08Fix compiler warningsShadowNinja
2022-04-07Compile Lua as C++ (#11683)Jude Melton-Houghton
Co-authored-by: sfan5 <sfan5@live.de>
2022-02-26Move the codebase to C++14sfan5
2022-01-30Get rid of empty test filesfan5
2022-01-30Raise max mapgen limit constant to align with mapblock sizesfan5
2022-01-07Use a database for mod storage (#11763)Jude Melton-Houghton
2021-12-29Socket-related cleanupssfan5
Improve error handling on Windows and reduce the size of the `Address` class
2021-12-05Fix various code & correctness issues (#11815)sfan5
2021-12-01Network: Delete copy constructor and use std::move instead (#11642)SmallJoker
This is a follow-up change which disables class copies where possible to avoid unnecessary memory movements.
2021-11-26Fix find_nodes_in_area misbehaving with out-of-map coordinates (#11770)sfan5
This ensures that no overflows (side-effects) happen within the find_nodes_in_area function by limiting coordinates like done in the map generation code.
2021-11-01Localize error messages in mainmenu (#11495)Riceball LEE
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-10-07Add "MINETEST_MOD_PATH" environment variable (#11515)emixa-d
This adds an environment variable MINETEST_MOD_PATH. When it exists, Minetest will look there for mods in addition to ~/.minetest/mods/.
2021-09-17Shave off buffer copies in networking code (#11607)sfan5
2021-09-17Hide Wself-assign-overloaded and Wself-move unittest compilation warningsHybridDog
The warnings occured with the clang compiler
2021-09-11Make sure relevant std::stringstreams are set to binarysfan5
2021-08-31Switch MapBlock compression to zstd (#10788)lhofhansl
* Add zstd support. * Rearrange serialization order * Compress entire mapblock Co-authored-by: sfan5 <sfan5@live.de>
2021-06-23Rework Settings to support arbitrary hierarchies (#11352)sfan5
2021-05-30Fix base64 validation and add unittests (#10515)Lars Müller
Implement proper padding character checks
2021-05-03fix: some code tidy about includes & irr namespacesLoic Blot
2021-05-03refacto: don't use RenderingEngine singleton on CAOLoic Blot
* we don't need on CAO side more than SceneManager, and temporary. Pass only required SceneManager as a parameter to build CAO and add them to the current scene * Use temporary the RenderingEngine singleton from ClientEnvironment, waitfor for better solution * Make ClientActiveObject::addToScene virtual function mandatory to be defined by children to ensure we don't forget to properly define it
2021-03-20Schematic: Properly deal with before/after node resolving and document (#11011)SmallJoker
This fixes an out-of-bounds index access when the node resolver was already applied to the schematic (i.e. biome decoration). Also improves the handling of the two cases: prior node resolving (m_nodenames), and after node resolving (manual lookup)
2021-02-02Encode high codepoints as surrogates to safely transport wchar_t over networksfan5
fixes #7643
2021-02-02Drop wide/narrow conversion functionssfan5
The only valid usecase for these is interfacing with OS APIs that want a locale/OS-specific multibyte encoding. But they weren't used for that anywhere, instead UTF-8 is pretty much assumed when it comes to that. Since these are only a potential source of bugs and do not fulfil their purpose at all, drop them entirely.
2021-02-02Refactor utf8_to_wide/wide_to_utf8 functionssfan5
2021-01-29Rework use_texture_alpha to provide three opaque/clip/blend modessfan5
The change that turns nodeboxes and meshes opaque when possible is kept, as is the compatibility code that warns modders to adjust their nodedefs.
2021-01-29Settings: Purge getDefault, clean FontEngineSmallJoker