[plt-scheme] Using scheme-unit from DrScheme

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Fri May 9 06:08:27 EDT 2003

--- Michael Vanier <mvanier at cs.caltech.edu> wrote:
> (BTW, it was a truly brilliant idea to include
this).  

Credit to Ryan C for doing it.

> The dialog box says to
> "enter an expression that will evaluate to a test or
> list of tests in the
> text box".  What kind of expression is that?

Basically its an expression that will evaluate to a
test-suite in the context of whatever is in the
DrScheme buffer.

So in the case of SchemeUnit, all the tests are
grouped into all-schemeunit-tests.ss  Rewrite the file
thus:

(require "test.ss"
         "text-ui.ss"
         "assert-test.ss"
         "assert-util-test.ss"
         "test-test.ss")

(define all-tests
 (make-test-suite
  "All SchemeUnit Tests"
  assert-tests
  assert-util-tests
  test-tests
  (make-test-case "Intended to fail" (fail))
  (make-test-case "Also intended to fail" (assert-eq?*
'apples 'orange))
  (make-test-case "Intended to throw error" (error
'testing "<<This is an error message>>"))
  ))

and then the expression to enter in the box is

  all-tests

> Is there a tutorial for this floating around 
> somewhere?

Yes.  Check the PLT archives for this post ;-)

No, there is nothing I'm aware of.  Should someone
feel motivated to write one we would happily include
it in the next release of SchemeUnit.

HTH,
Noel

=====
Email: noelwelsh <at> yahoo <dot> com
Jabber: noelw <at> jabber <dot> org

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


Posted on the users mailing list.