procedural interface Alex Shinn (29 Jan 2005 06:43 UTC)
Re: procedural interface Per Bothner (29 Jan 2005 07:08 UTC)
Re: procedural interface Alex Shinn (29 Jan 2005 09:28 UTC)

procedural interface Alex Shinn 29 Jan 2005 06:42 UTC

It seems like the only forms which need to be macros are

  test-assert
  test-equal
  test-eqv
  test-eq
  test-error

because they need to delay/skip evalutation of the test form and setup
appropriate error handlers.  However, if the test form were a thunk
they wouldn't need to be macros at all.

What if we define and expose test-thunk:

  --procedure: test-thunk [name] thunk

which does the same as test-assert but takes a thunk which it
evaluates when it is run.  Then the above macros could just be
convenience wrappers around this.  None of the other forms would need
to be macros.

Even if we don't expose a procedural interface the SRFI should specify
that the test-name is evaluated at runtime, for use with data driven
tests (I agree the name should be a string).

--
Alex