diff options
Diffstat (limited to 'testes')
-rw-r--r-- | testes/math.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testes/math.lua b/testes/math.lua index 0c297e74..d0aaa6a5 100644 --- a/testes/math.lua +++ b/testes/math.lua | |||
@@ -842,9 +842,11 @@ end | |||
842 | 842 | ||
843 | do | 843 | do |
844 | -- testing return of 'randomseed' | 844 | -- testing return of 'randomseed' |
845 | local <const> x, <const> y = math.randomseed() | 845 | local x, y = math.randomseed() |
846 | local res = math.random(0) | 846 | local res = math.random(0) |
847 | math.randomseed(x, y) -- should repeat the state | 847 | x, y = math.randomseed(x, y) -- should repeat the state |
848 | assert(math.random(0) == res) | ||
849 | math.randomseed(x, y) -- again should repeat the state | ||
848 | assert(math.random(0) == res) | 850 | assert(math.random(0) == res) |
849 | -- keep the random seed for following tests | 851 | -- keep the random seed for following tests |
850 | end | 852 | end |