Closed javalikescript closed 4 years ago
For the sake of the coverage, I modified the pull request to avoid testing the Lua version. The bad part is that it not more use the new Lua 5.4 random seed.
The decrease in coverage is just because I don't have lua 5.4 in the CI pipeline yet. Don't worry about that.
Ordering test randomly does not need a strong random generator though, I believe we can live with suboptimal seed :-)
I am in favor of the new Lua 5.4 random seed but I do not like the Lua version test. The seed using a single line also helps to read the code so I will stick to it, for now.
Thanks. I'll try to add proper support for Lua 5.4
The
math.randomseed
method has been updated in Lua 5.4, see Lua reference. The current luaunit usage fails occasionally with the error "bad argument # 1 to 'randomseed' (number has no integer representation)". This pull request will call the method without arguments when using Lua 5.4.