1
0
mirror of https://github.com/minetest/minetest.git synced 2024-09-24 13:30:30 +02:00
minetest/games/devtest/mods/unittests/random.lua

11 lines
302 B
Lua

function unittests.test_random()
-- Try out PseudoRandom
minetest.log("action", "[unittests] Testing PseudoRandom ...")
local pseudo = PseudoRandom(13)
assert(pseudo:next() == 22290)
assert(pseudo:next() == 13854)
minetest.log("action", "[unittests] PseudoRandom test passed!")
return true
end