diff --git a/rackunit-doc/rackunit/scribblings/control-flow.scrbl b/rackunit-doc/rackunit/scribblings/control-flow.scrbl index 56a7307..9f61b12 100644 --- a/rackunit-doc/rackunit/scribblings/control-flow.scrbl +++ b/rackunit-doc/rackunit/scribblings/control-flow.scrbl @@ -7,7 +7,7 @@ The @racket[before], @racket[after], and @racket[around] macros allow you to specify code that is always run before, after, or around expressions in a test case. -@defform[(before before-expr expr1 expr2 ...)]{ +@defform[(before before-expr expr-1 expr-2 ...)]{ Whenever control enters the scope execute the @racket[before-expr] before executing @racket[expr-1], and @racket[expr-2 ...]} diff --git a/rackunit-doc/rackunit/scribblings/rackunit-screen-shot.png b/rackunit-doc/rackunit/scribblings/rackunit-screen-shot.png new file mode 100644 index 0000000..b8dd016 Binary files /dev/null and b/rackunit-doc/rackunit/scribblings/rackunit-screen-shot.png differ diff --git a/rackunit-doc/rackunit/scribblings/ui.scrbl b/rackunit-doc/rackunit/scribblings/ui.scrbl index ececf6f..49afc78 100644 --- a/rackunit-doc/rackunit/scribblings/ui.scrbl +++ b/rackunit-doc/rackunit/scribblings/ui.scrbl @@ -47,6 +47,29 @@ GUI is updated as tests complete. When @racket[wait?] is true, @racket[test/gui] does not return until the test runner window has been closed. + + Given the following program, the RackUnit GUI will look as shown below: + + @racketblock[ + #,(hash-lang) racket + (require rackunit rackunit/gui) + (test/gui + (test-suite + "all tests" + (test-suite + "math tests" + (test-case "addition" (check-equal? (+ 1 1) 2)) + (test-case "subtraction" (check-equal? (- 0 0) 0)) + (test-case "multiplication" (check-equal? (* 2 2) 5))) + (test-suite + "string tests" + (test-case "append" (check-equal? (string-append "a" "b") "ab")) + (test-case "ref" (check-equal? (string-ref "abc" 1) #\b)))))] + + @image["scribblings/rackunit-screen-shot.png"]{Screenshot of the RackUnit + window. It features a tree representing the nested test suites (with test + cases as leaves) on the left pane, and information about the selected test + failure in the right pane.} } @defproc[(make-gui-runner)