Fix initrand to avoid random number sequences overlapping (#18744)

* Fix initrand to avoid random number sequences overlapping

* Minor fix

* Fix compile error on js backend

* Disable new test for js backend

* Minor fix

* tempfiles module uses random.initRand()

* Remove unused module import from lib/std/tempfiles.nim

* Initialize baseState in initRand()

* Run tests/stdlib/trandom.nim from tests/test_nimscript.nims

* baseState is initialized only with sysrand.urandom and quit if failed

* Add comments
This commit is contained in:
Tomohiro
2021-09-02 21:12:14 +09:00
committed by GitHub
parent e0ef859130
commit 7c8ea490a2
4 changed files with 95 additions and 20 deletions

View File

@@ -71,6 +71,8 @@ import std/[
decls, compilesettings, with, wrapnils
]
import stdlib/trandom
echo "Nimscript imports are successful."
block: