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

procedural interface

This page is part of the web mail archives of SRFI 64 from before July 7th, 2015. The new archives for SRFI 64 contain all messages, not just those from before July 7th, 2015.



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