[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic modules: should should-error work?
From: |
Eli Zaretskii |
Subject: |
Re: Dynamic modules: should should-error work? |
Date: |
Mon, 07 Dec 2015 22:18:34 +0200 |
> From: Philipp Stephani <address@hidden>
> Date: Mon, 07 Dec 2015 20:09:49 +0000
> Cc: address@hidden
>
> > + (let ((descr (should-error (mod-test-sum 1 2 3))))
> > + (should (eq (car descr) 'wrong-number-of-arguments))
> >
> >
> > I think testing using :type would also accept subtypes of the given
> type,
> which
> > I think would be preferrable (I'd expect that generally subtypes of the
> > documented signals are allowed to be thrown).
>
> I'm not sure I understand what you are saying. Can you give an
> example?
>
> If it is documented that an error of type X is thrown, does that mean the
> error
> symbol is exactly X or rather that one of its conditions is X?
In general, the latter; but for wrong-number-of-arguments we know it
has no additional conditions, so it will be exactly it and nothing
else.