summaryrefslogtreecommitdiff
path: root/games/devtest/mods/unittests/random.lua
blob: f94f0a88e88b901e9a402a6399840400c8112c65 (plain)
1
2
3
4
5
6
7
8
9
10
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