Skip to content

Can't define new top-level suite with def-suite or def-suite* #79

@rpgoldman

Description

@rpgoldman

The problem is the way that these macros handle their :in keyword argument (

(defmacro def-suite (name &key description in)
):

(defmacro def-suite (name &key description in)
  "Define a new test-suite named NAME.
IN (a symbol), if provided, causes this suite te be nested in the
suite named by IN. NB: This macro is built on top of make-suite,
as such it, like make-suite, will overrwrite any existing suite
named NAME."
  `(eval-when (:compile-toplevel :load-toplevel :execute)
     (make-suite ',name
                 ,@(when description `(:description ,description))
                 ,@(when in `(:in ',in)))
     ',name))

If you explicitly supply :in nil as a way to indicate that you want a top-level suite, the macro will simply discard it. To fix this, we need to have (in nil in-supplied-p) and we need to check in-supplied-p and not in in the when form.

I could make a merge request, but would like to know that it would be accepted (assuming it's a good MR) before bothering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions