summaryrefslogtreecommitdiff
path: root/games/devtest/mods/unittests/random.lua
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2020-05-26 00:17:52 +0200
committerGitHub <noreply@github.com>2020-05-26 00:17:52 +0200
commit083b285f4319c470f307f0b52f03a2fb68facd38 (patch)
treebdd02540ad58756a38606f03a995ab837a176709 /games/devtest/mods/unittests/random.lua
parentb546e8938d41aa9e3101fb9d4d5b02924ed73b60 (diff)
downloadminetest-083b285f4319c470f307f0b52f03a2fb68facd38.tar.gz
minetest-083b285f4319c470f307f0b52f03a2fb68facd38.tar.bz2
minetest-083b285f4319c470f307f0b52f03a2fb68facd38.zip
Rename “Minimal development test” to “Development Test” (#9928)
Diffstat (limited to 'games/devtest/mods/unittests/random.lua')
-rw-r--r--games/devtest/mods/unittests/random.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/games/devtest/mods/unittests/random.lua b/games/devtest/mods/unittests/random.lua
new file mode 100644
index 000000000..f94f0a88e
--- /dev/null
+++ b/games/devtest/mods/unittests/random.lua
@@ -0,0 +1,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
+