[plt-scheme] Setup and teardown in SchemeUnit

From: Michał Kwiatkowski (constant.beta at gmail.com)
Date: Sun Nov 30 17:47:54 EST 2008

2008/11/30 Noel Welsh <noelwelsh at gmail.com>:
> The before, after, and around macros are the SchemeUnit equivalent.

Let me show you a sample code:

#lang scheme
(require (planet schematics/schemeunit:3))
(before
  (begin (display "Before") (newline))
  (check-equal? 0 0)
  (check-equal? 1 1)
  (check-equal? 2 2))

This displays "Before" only once. Is there a way to tell SchemeUnit to
invoke setup procedure once for each test (so there would be three
"Before"s in an example above)?

Cheers,
mk


Posted on the users mailing list.