summaryrefslogtreecommitdiff
path: root/testes/all.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-17 16:00:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-17 16:00:24 -0300
commit4eefef07ab1c136f901d816822c79336fa89336d (patch)
treece2232ba8a09287899af1ac07af0c902800bfae6 /testes/all.lua
parent9c28ed05c95cb6854d917ac3e3ed7be9ae109480 (diff)
downloadlua-github-4eefef07ab1c136f901d816822c79336fa89336d.tar.gz
'math.randomseed()' returns the seeds it used
A call to 'math.randomseed()' returns the two components of the seed it set, so that they can be used to set that same seed again.
Diffstat (limited to 'testes/all.lua')
-rw-r--r--testes/all.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/testes/all.lua b/testes/all.lua
index 72121e8d..bf27f106 100644
--- a/testes/all.lua
+++ b/testes/all.lua
@@ -37,8 +37,6 @@ end
-- tests should require debug when needed
debug = nil
-require"bwcoercion"
-
if usertests then
T = nil -- no "internal" tests for user tests
@@ -46,7 +44,6 @@ else
T = rawget(_G, "T") -- avoid problems with 'strict' module
end
-math.randomseed(0)
--[=[
example of a long [comment],
@@ -54,6 +51,14 @@ math.randomseed(0)
]=]
+print("\n\tStarting Tests")
+
+do
+ -- set random seed
+ local random_x, random_y = math.randomseed()
+ print(string.format("random seeds: %d, %d", random_x, random_y))
+end
+
print("current path:\n****" .. package.path .. "****\n")