help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: ERT: should-error doesn't catch failed assertions


From: Emanuel Berg
Subject: Re: ERT: should-error doesn't catch failed assertions
Date: Mon, 18 Jul 2016 02:42:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Sean McAfee <address@hidden> writes:

> As described on that page, I see (should-error
> (/ 1 0)) evaluate to (arith-error).

OK, gotcha:

    (require 'ert)
    (should-error (/ 1 0))

> But assertion failures seem to not count as
> "errors" as far as should-error is concerned.

Why do you want to combine `should-error' with
`assert' and what result is it that you expect?

    (should-error (cl-assert (/ 1 0)))

?

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 58 Blogomatic articles -                   


reply via email to

[Prev in Thread] Current Thread [Next in Thread]