diff --git a/networks-tests.rkt b/networks-tests.rkt index a94d7af..8d0a637 100644 --- a/networks-tests.rkt +++ b/networks-tests.rkt @@ -84,7 +84,8 @@ (let* ([n #hash((a . (not b)) (b . a))] [doms (make-boolean-domains '(a b))] [sig1 (build-signed-interaction-graph/form n doms)] - [sig2 (build-boolean-signed-interaction-graph/form n)]) + [sig2 (build-boolean-signed-interaction-graph/form n)] + [sig3 (build-boolean-signed-interaction-graph (nn n))]) (check-equal? (get-interaction-sign (nn n) doms 'a 'b) '+) (check-equal? (get-interaction-sign (nn n) doms 'b 'a) '-) @@ -108,7 +109,14 @@ (check-false (has-edge? sig2 'c 'b)) (check-false (has-edge? sig2 'c 'a)) (check-equal? (edge-weight sig2 'a 'b) '+) - (check-equal? (edge-weight sig2 'b 'a) '-))) + (check-equal? (edge-weight sig2 'b 'a) '-) + + (check-true (has-vertex? sig3 'a)) + (check-true (has-vertex? sig3 'b)) + (check-equal? (edge-weight sig3 'a 'a) '+) + (check-equal? (edge-weight sig3 'b 'b) '+) + (check-equal? (edge-weight sig3 'a 'b) '+) + (check-equal? (edge-weight sig3 'b 'a) '-))) (test-case "Dynamics of networks" (check-equal? (pretty-print-state (st '((a . #f) (b . 3) (c . 4)))) "a:#f b:3 c:4")