[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

procedural interface



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