Only set random-seed once in the whole test submodule.

This commit is contained in:
Sergiu Ivanov 2023-03-24 16:05:52 +01:00
parent 59b90d4c12
commit e2e0ee6903

View file

@ -1059,9 +1059,10 @@
([st (build-all-states arg-domains)]) ([st (build-all-states arg-domains)])
(list st (random-ref func-domain))))) (list st (random-ref func-domain)))))
(module+ test (random-seed 1))
(module+ test (module+ test
(test-case "random-function/state" (test-case "random-function/state"
(random-seed 1)
(define doms (hash 'a '(1 2) 'b '(3 4))) (define doms (hash 'a '(1 2) 'b '(3 4)))
(define f (random-function/state doms '(e f))) (define f (random-function/state doms '(e f)))
(check-equal? (tabulate-state+headers f doms) (check-equal? (tabulate-state+headers f doms)
@ -1073,10 +1074,9 @@
(module+ test (module+ test
(test-case "random-boolean-function/state" (test-case "random-boolean-function/state"
(random-seed 1)
(define f (random-boolean-function/state '(x1 x2))) (define f (random-boolean-function/state '(x1 x2)))
(check-equal? (tabulate-state+headers/boolean f '(x1 x2)) (check-equal? (tabulate-state+headers/boolean f '(x1 x2))
'((x1 x2 f1) (#f #f #f) (#f #t #f) (#t #f #t) (#t #t #f))))) '((x1 x2 f1) (#f #f #f) (#f #t #f) (#t #f #t) (#t #t #t)))))
) )
(require 'typed) (require 'typed)