Added screenshot of the RackUnit GUI, fixed typo.
This commit is contained in:
parent
19a87ffe13
commit
71c164e9f0
|
@ -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 ...]}
|
||||
|
|
BIN
rackunit-doc/rackunit/scribblings/rackunit-screen-shot.png
Normal file
BIN
rackunit-doc/rackunit/scribblings/rackunit-screen-shot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user