From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: should should-error work? Date: Tue, 24 Nov 2015 21:32:28 +0200 Message-ID: <83mvu3xkfn.fsf@gnu.org> References: <838u5p3n32.fsf@gnu.org> <83si3wzdeb.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448393574 8037 80.91.229.3 (24 Nov 2015 19:32:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2015 19:32:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 24 20:32:44 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a1JKU-00020d-Fc for ged-emacs-devel@m.gmane.org; Tue, 24 Nov 2015 20:32:42 +0100 Original-Received: from localhost ([::1]:41008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1JKV-0004lf-Hz for ged-emacs-devel@m.gmane.org; Tue, 24 Nov 2015 14:32:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1JKQ-0004ig-Hu for emacs-devel@gnu.org; Tue, 24 Nov 2015 14:32:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1JKN-0004Mz-Ct for emacs-devel@gnu.org; Tue, 24 Nov 2015 14:32:38 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:54308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1JKN-0004Mj-5I for emacs-devel@gnu.org; Tue, 24 Nov 2015 14:32:35 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NYC00D003IMIC00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Tue, 24 Nov 2015 21:32:30 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYC00DWL3M56460@a-mtaout20.012.net.il>; Tue, 24 Nov 2015 21:32:30 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195181 Archived-At: > From: Philipp Stephani > Date: Tue, 24 Nov 2015 19:27:32 +0000 > Cc: emacs-devel@gnu.org > > + (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? > + (should (stringp (nth 1 descr))) > + (should (eq 0 > + (string-match "#" > + (nth 1 descr)))) > + (should (= (nth 2 descr) 3)))) > > Maybe replace the regex with "\\`#\\'" to make it work if > dladdr is available. That's what I did in the final commit a few minutes ago. Thanks.