From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.bugs Subject: bug#24402: More Information Date: Mon, 19 Sep 2016 21:27:54 -0700 Message-ID: <596E65D2-E780-43A1-A75B-603B61B6F9F4@runbox.com> References: <3654D8E9-D3CB-402B-922F-B132C1871E9F@runbox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1474345768 23660 195.159.176.226 (20 Sep 2016 04:29:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Sep 2016 04:29:28 +0000 (UTC) To: 24402@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 20 06:29:24 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmCgH-0004zJ-Pj for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Sep 2016 06:29:17 +0200 Original-Received: from localhost ([::1]:60014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmCgG-0005OG-3S for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Sep 2016 00:29:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmCg6-0005N1-Ss for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2016 00:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmCg1-00015i-T1 for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2016 00:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmCg1-00015e-P7 for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2016 00:29:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bmCg1-0002eN-Lp for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2016 00:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2016 04:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24402 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24402-submit@debbugs.gnu.org id=B24402.147434569310132 (code B ref 24402); Tue, 20 Sep 2016 04:29:01 +0000 Original-Received: (at 24402) by debbugs.gnu.org; 20 Sep 2016 04:28:13 +0000 Original-Received: from localhost ([127.0.0.1]:57765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmCfF-0002dL-0Q for submit@debbugs.gnu.org; Tue, 20 Sep 2016 00:28:13 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:60644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmCfC-0002dC-Du for 24402@debbugs.gnu.org; Tue, 20 Sep 2016 00:28:11 -0400 Original-Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1bmCfA-0005Qz-U2 for 24402@debbugs.gnu.org; Tue, 20 Sep 2016 06:28:09 +0200 Original-Received: from cpe-108-184-181-48.socal.res.rr.com ([108.184.181.48] helo=[192.168.1.142]) by mailfront10.runbox.com with esmtpsa (uid:179284 ) (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1bmCez-0007vF-Ln for 24402@debbugs.gnu.org; Tue, 20 Sep 2016 06:27:57 +0200 In-Reply-To: X-Mailer: Apple Mail (2.3124) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123468 Archived-At: I=E2=80=99ve done some investigating of why this is happening. = testcover-start transforms: (should-error (my-error)) into: (should-error (testcover-after 2 (my-error))) Then the macro expansion of should-error separates the form which it is passed into a function symbol and list of arguments, and applies the function to the arguments inside of a condition-case that traps errors. The problem is that the arguments are evaluated first, outside of the condition-case, so errors in their evaluation do not get caught. This problem is not specific to testcover. In this example, the first test passes and the second fails: (defun div-by (n) (/ 100 n)) (defmacro log-div-by (n) `(message "div-by: %d" (div-by ,n))) (ert-deftest test-div-by () (should-error (div-by 0))) (ert-deftest test-log-div-by () (should-error (log-div-by 0))) =20