diff --git a/functions.rkt b/functions.rkt index 7a01699..067f4ee 100644 --- a/functions.rkt +++ b/functions.rkt @@ -377,21 +377,24 @@ (define sbf? (and/c tbf? (λ (x) (= 0 (tbf-θ x))))) (module+ test - (check-false (sbf? (tbf #(1 2) 3))) - (check-true (sbf? (tbf #(1 2) 0)))) + (test-case "sbf?" + (check-false (sbf? (tbf #(1 2) 3))) + (check-true (sbf? (tbf #(1 2) 0))))) ;;; Creates a TBF which is an SBF from a vector of weights. (define (sbf w) (tbf w 0)) (module+ test - (check-equal? (sbf #(1 -1)) (tbf '#(1 -1) 0))) + (test-case "sbf" + (check-equal? (sbf #(1 -1)) (tbf '#(1 -1) 0)))) ;;; Converts a list of numbers to an SBF. The elements of the list ;;; are taken to be the weights of the SBF. (define list->sbf (compose sbf list->vector)) (module+ test - (check-equal? (list->sbf '(1 -1)) (tbf '#(1 -1) 0))) + (test-case "list->sbf" + (check-equal? (list->sbf '(1 -1)) (tbf '#(1 -1) 0)))) ;;; Reads a list of SBF from an Org-mode string containing a sexp, ;;; containing a list of lists of numbers. If headers is #t, drops @@ -405,5 +408,6 @@ (map list->sbf sexp-clean)) (module+ test - (check-equal? (read-org-sbfs "((1 1) (1 -1))") - (list (tbf '#(1 1) 0) (tbf '#(1 -1) 0)))) + (test-case "read-org-sbfs" + (check-equal? (read-org-sbfs "((1 1) (1 -1))") + (list (tbf '#(1 1) 0) (tbf '#(1 -1) 0)))))