Optional description for assertion macro Andrew Tropin 30 May 2026 03:51 UTC
This is another upcoming syntax change.  This time it's backward
compatible.

At the moment assertion syntax looks like this:
(is (our-cool-predicate? x y z))

In reporter we can use the whole assertion body, the predicate,
arguments, and/or their evaluated values to create understandable
reports.  However, sometimes the assertion expression is crystal
clear, but the domain meaning is not.

So I plan to add an assertion/description, which can be set by an
optional second argument for is macro.

(test ("permission inheritance" ctx)
  (define db (assoc-ref ctx 'db))
  (define project (create-project! db "srfi-269"))
  (define user (project-creator project))
  (define permissions (user-permissions db user project))

  (is (member 'project/admin permissions)
      "project creator receives administration permission for the project"))

--
Best regards,
Andrew Tropin