undercover-el / undercover.el

A test coverage library for Emacs
MIT License
86 stars 14 forks source link

Error while covering cl-defstruct with slots and no default-value #29

Closed DamienCassou closed 7 years ago

DamienCassou commented 7 years ago

I just got that for my new project:

UNDERCOVER: error while covering /home/cassou/.emacs.d/packages/klassified/klassified.el
UNDERCOVER: please open a new issue at https://github.com/sviridov/undercover.el/issues
DamienCassou commented 7 years ago

it seems to fail if I have this in the code:

(cl-defstruct klassified-class
  (superclass-ref))

and it works again if I write this instead

(cl-defstruct klassified-class
  superclass-ref)
sviridov commented 7 years ago

@DamienCassou, it happens because edebug specification for cl-defstruct doesn't support such version of cl-defstruct.

Just call (get-edebug-spec 'cl-defstruct) to see it. Result for my version of Emacs is:

(&define
 [&or symbolp
      (gate symbolp &rest
            (&or
             [":conc-name" symbolp]
             [":constructor" symbolp &optional cl-lambda-list]
             [":copier" symbolp]
             [":predicate" symbolp]
             [":include" symbolp &rest sexp]))]
 [&optional stringp]
 &rest &or symbolp
 (symbolp def-form &optional ":read-only" sexp))

First argument should either symbol or list that at least contains gate (no idea what it is) and symbol.

DamienCassou commented 7 years ago

Thank you for your answer.