minetest/src/unittest
est31 738fbc66d0 Fix Lua PcgRandom
Before, this lua code led to a crash:

local pcg = PcgRandom(42)
local value = pcg:next()

This was because if you called s32 PcgRandom::range(min, max) with the
minimum and maximum possible values for s32 integers (which the lua
binding code did), u32 PcgRandom::range(bound) got called with 0 as the
bound. The bound however is one above the maximum value, so 0 is a "special"
value to pass to this function. This commit fixes the lua crash by
assigning the RNG's full range to the bound 0, which is also fits to the
"maximum is bound - 1" principle, as (u32)-1 is the maximum value in the
u32 range.
2015-08-12 11:36:22 +02:00
..
CMakeLists.txt Add AreaStore data structure 2015-07-27 06:42:56 +02:00
test.cpp Tests: Add schematic unittests 2015-05-08 00:55:42 -04:00
test.h tests: Log exceptions thrown inside of unit tests 2015-07-31 23:30:25 -04:00
test_areastore.cpp Add AreaStore data structure 2015-07-27 06:42:56 +02:00
test_collision.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_compression.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_connection.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_filepath.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_inventory.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_mapnode.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_nodedef.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_noderesolver.cpp NodeResolver: Remove NodeResolveMethod 2015-05-07 02:36:01 -04:00
test_noise.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_objdef.cpp Split ObjDef/ObjDefManager out to objdef.cpp 2015-05-18 22:30:25 -04:00
test_profiler.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_random.cpp Fix Lua PcgRandom 2015-08-12 11:36:22 +02:00
test_schematic.cpp Add -Wsign-compare for Clang builds and fix some signed/unsigned compiler warnings 2015-05-16 20:15:03 -04:00
test_serialization.cpp Improve accuracy and safety of float serialization 2015-08-01 19:30:08 -04:00
test_settings.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_socket.cpp Tests: Modularize unit testing 2015-04-26 15:08:54 -04:00
test_utilities.cpp Fix wrap_rows at inner byte of multibyte sequence 2015-06-18 23:39:23 +02:00
test_voxelalgorithms.cpp Tests: Add NodeResolver unittests 2015-05-05 12:00:36 -04:00
test_voxelmanipulator.cpp Tests: Add NodeResolver unittests 2015-05-05 12:00:36 -04:00