#lang scribble/doc @require[scribble/manual scribble/eval scribble/basic (for-label "main.ss")] @title[#:tag "top"]{Utilities for Unit Testing} @declare-exporting[(planet dherman/test:2)] by @author+email["Dave Herman" "dherman@ccs.neu.edu"] This package provides several utility functions and forms for unit testing. @table-of-contents[] @section[#:tag "started"]{Getting Started} This package provides one module: @schemeblock[(require (planet dherman/test:2))] @section[#:tag "functions"]{Functions} @defproc[(list-permutation? (ls1 list?) (ls2 list?) (equiv? (any any -> boolean?) eq?)) boolean?]{ Determines whether @scheme[ls1] and @scheme[ls2] are equivalent up to reordering.} @section[#:tag "forms"]{Forms} @defform[(in-this-directory body-form ...+)]{ An expression form that evaluates each @scheme[body-form] with the @scheme[current-directory] @scheme[parameterize]d to the directory containing the module in which the expression appears.} @defform[(in-new-directory dir-expr body-form ...+)]{ An expression form that creates the directory @scheme[dir-expr] and evaluates each @scheme[body-form] with the @scheme[current-directory] @scheme[parameterize]d to the new directory. If @scheme[keep-new-directories?] is @scheme[#f], the new directory is completely erased, including all of its contents, after evaluation terminates.} @defthing[keep-new-directories? (parameter/c boolean?)]{ Should @scheme[in-new-directory] allow created directories to persist after completing?}