network-test: Fix some indentation.

This commit is contained in:
Sergiu Ivanov 2020-03-22 14:36:02 +01:00
parent a40106e47c
commit aa7ba6de8a

View file

@ -229,17 +229,17 @@
(check-false (f1/list '(#f))) (check-false (f1/list '(#t)))))
(test-case "Random Boolean functions and networks"
(random-seed 0)
(check-equal? (random-boolean-table 2) '((#f #f #t) (#f #t #t) (#t #f #f) (#t #t #f)))
(let ([f (random-boolean-function 2)])
(check-true (f #f #f)) (check-false (f #f #t)) (check-true (f #t #f)) (check-false (f #t #t)))
(let ([f (random-boolean-function/list 2)])
(check-false (f '(#f #f))) (check-true (f '(#f #t)))
(check-true (f '(#t #f))) (check-false (f '(#t #t))))
(begin
(random-seed 0)
(define f (random-boolean-function/state '(x1 x2)))
(check-equal? (tabulate-state/boolean f '(x1 x2))
'((x1 x2 f) (#f #f #f) (#t #f #f) (#f #t #t) (#t #t #t)))
(check-equal? (tabulate-state/boolean f '(x1 x2) #:headers #f)
'((#f #f #f) (#t #f #f) (#f #t #t) (#t #t #t)))))
(random-seed 0)
(check-equal? (random-boolean-table 2) '((#f #f #t) (#f #t #t) (#t #f #f) (#t #t #f)))
(let ([f (random-boolean-function 2)])
(check-true (f #f #f)) (check-false (f #f #t)) (check-true (f #t #f)) (check-false (f #t #t)))
(let ([f (random-boolean-function/list 2)])
(check-false (f '(#f #f))) (check-true (f '(#f #t)))
(check-true (f '(#t #f))) (check-false (f '(#t #t))))
(begin
(random-seed 0)
(define f (random-boolean-function/state '(x1 x2)))
(check-equal? (tabulate-state/boolean f '(x1 x2))
'((x1 x2 f) (#f #f #f) (#t #f #f) (#f #t #t) (#t #t #t)))
(check-equal? (tabulate-state/boolean f '(x1 x2) #:headers #f)
'((#f #f #f) (#t #f #f) (#f #t #t) (#t #t #t)))))