From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: How to assert "throw" by ERT? Date: Thu, 17 Jan 2013 23:03:18 +0200 Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net Message-ID: <87r4ljr089.fsf@gavenkoa.example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358458271 27834 80.91.229.3 (17 Jan 2013 21:31:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2013 21:31:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 17 22:31:30 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1Tvx3X-0000l2-Vv for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 22:31:28 +0100 Original-Received: from localhost ([::1]:57932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvx3H-0000ir-E4 for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 16:31:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvx3A-0000i3-HC for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 16:31:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tvwdl-0000xs-NW for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 16:04:53 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:37170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvwdl-0000xa-FU for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 16:04:49 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Tvwe0-0001fO-9z for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 22:05:04 +0100 Original-Received: from 37.229.4.200 ([37.229.4.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jan 2013 22:05:04 +0100 Original-Received: from gavenkoa by 37.229.4.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jan 2013 22:05:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 37.229.4.200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:YD6erri10O4VZVfhuJQ0H13x9bs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88688 Archived-At: ERT is Emacs Lisp Regression Testing and ERT packed in GNU Emacs. I want to check that my function throw on some input data: (defun foo (arg) (unless arg (throw :invalid-arg nil))) I write: (ert-deftest foo-fail-test () (should-error (foo nil) :type :invalid-arg) ) but seems this is wrong usege or 'should-error'. Please help me with example... -- Best regards!