(index ("test" 0) ("test-assert" 874) ("test-error" 874) ("test-begin" 1199) ("test-end" 1199) ("test-group" 1540) ("test-exit" 1854) ("current-test-verbosity" 2176) ("current-test-epsilon" 2322) ("current-test-comparator" 2455) ("current-test-filters" 2557) ("current-test-group-filters" 2681) ("current-test-applier" 2820) ("current-test-handler" 2820) ("current-test-skipper" 2820) ("current-test-group-reporter" 2820))
(def (sig (syntax "(test [<name>] <expected-value> <expression>)" (id test))) (p "The basic test interface; really all you need to use.  It will catch errors and print informative failure messages, including the name (which must be a string if present, and defaults to an abbreviated form of the test expression), the source, and the line number information of the failed expression.  Equality is checked with EQUAL?, unless the expected value is inexact, in which case it checks to be sure the percentage difference (or absolute difference if one value is zero) between the result and expected value fall within the TEST-EPSILON parameter of each other.  This is because it almost never makes sense to test inexact numbers with EQUAL? or =, and usually you'll want a single epsilon throughout a range of tests.  However, you can always test = manually with TEST-ASSERT."))
(def (sig (syntax "(test-assert [<name>] <expression>)" (id test-assert)) (syntax "(test-error [<name>] <expression>)" (id test-error))) (p "Convenience wrappers around " (tt "test") ". " (tt "test-assert") " asserts that the expression is non-false; " (tt "test-error") " asserts that the expression results in an error."))
(def (sig (syntax "(test-begin [<name>])" (id test-begin)) (syntax "(test-end [<name>])" (id test-end))) (p "Test group reporting, including elapsed time and pass percentages, can be achieved using") (highlight scheme " (test-begin [<name>])\n (test ...)\n ...\n (test-end [<name>])") (p "where the group name is optional in either case."))
(def (sig (syntax "(test-group <name> ...)" (id test-group))) (p "You can group tests in a single lexical scope (and also establish nested groups) with the " (tt "test-group") " macro:") (highlight scheme " (test-group <name>\n   (test ...)\n   ...\n )") (p "The name for " (tt "test-group") " is not optional."))
(def (sig (procedure "(test-exit [<failure-exit-code>])" (id test-exit))) (p "As a convenience there is a " (tt "test-exit") " procedure, which exits the process with a status of 0 if all tests in all groups have passed, and with an optional numeric status (defaulting to 1), if there have been any failures or errors."))
(def (sig (parameter "current-test-verbosity" (id current-test-verbosity))) (p "Default to " (tt "#t") ", prints full diagnostics for failures"))
(def (sig (parameter "current-test-epsilon" (id current-test-epsilon))) (p "Percentage difference allowed for inexact comparisons"))
(def (sig (parameter "current-test-comparator" (id current-test-comparator))) (p (tt "TEST-EQUAL?")))
(def (sig (parameter "current-test-filters" (id current-test-filters))) (p "List of predicates to filter (not run) tests"))
(def (sig (parameter "current-test-group-filters" (id current-test-group-filters))) (p "List of predicates to filter entire test groups"))
(def (sig (parameter "current-test-applier" (id current-test-applier)) (parameter "current-test-handler" (id current-test-handler)) (parameter "current-test-skipper" (id current-test-skipper)) (parameter "current-test-group-reporter" (id current-test-group-reporter))) (p "These parameters can be used to override the reporting behavior, for example if you wanted a GUI interface instead of the default textual reporting."))
