(use test srfi-102) (test-group "Arity At Least?" (test-assert (not (arity-at-least? 23))) (test-assert (not (arity-at-least? -1.0))) (test 23 (arity-at-least-value 23.0)) (test 23 (arity-at-least-value 23)) ) (define (2-fixed a b) (list a b)) (define (2-at-least a b . r) (list a b r)) (test-group "Arity?" (test-assert (procedure-arity-available? +)) (test-assert (procedure-arity-available? 2-fixed)) (test-assert (procedure-arity-available? 2-at-least)) ) (test-group "Arity" (test-assert (procedure-fixed-arity? 2-fixed)) (test-assert (not (procedure-fixed-arity? 2-at-least))) (test 2 (procedure-arity 2-fixed)) (test 2.0 (procedure-arity 2-at-least)) (test-assert (procedure-arity-includes? 2-fixed 2)) (test-assert (procedure-arity-includes? 2-at-least 2)) (test-assert (procedure-arity-includes? 2-at-least 3)) (test 2 (procedure-minimum-arity 2-fixed)) (test 2 (procedure-minimum-arity 2-at-least)) ) (test-group "'+' Arity" (test-assert (not (procedure-fixed-arity? +))) (test-assert (not (procedure-arity-includes? + 23))) ) (test-exit)