projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5db1717
)
Test that make-random-source is deterministic.
author
Taylor R Campbell
<campbell@mumble.net>
Wed, 7 Nov 2018 17:20:23 +0000
(17:20 +0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Wed, 7 Nov 2018 17:20:23 +0000
(17:20 +0000)
tests/runtime/test-random.scm
patch
|
blob
|
history
diff --git
a/tests/runtime/test-random.scm
b/tests/runtime/test-random.scm
index d68aa828661ff5854c2dba66e9d1d29ba85e9a47..bd12ab2b51238011c7170343fd8c7a68a9d11a09 100644
(file)
--- a/
tests/runtime/test-random.scm
+++ b/
tests/runtime/test-random.scm
@@
-43,6
+43,13
@@
USA.
(assert-!= ((random-source-make-integers s0) (expt 2 32))
((random-source-make-integers s1) (expt 2 32))))))
+(define-test 'random-source-fresh-deterministic
+ (lambda ()
+ (let* ((s0 (make-random-source))
+ (s1 (make-random-source)))
+ (assert-= ((random-source-make-integers s0) (expt 2 64))
+ ((random-source-make-integers s1) (expt 2 64))))))
+
(define-test 'random-source-randomize!
(lambda ()
(let* ((s0 (make-random-state #t))