From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "John Wiegley" Newsgroups: gmane.emacs.devel Subject: Re: call for more ert tests Date: Mon, 24 Jun 2013 21:44:20 -0500 Organization: New Artisans LLC Message-ID: References: <838v1zjrnl.fsf@gnu.org> <8361x3jqsy.fsf@gnu.org> <8338s7jp53.fsf@gnu.org> <87bo6vb8uo.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372128268 16964 80.91.229.3 (25 Jun 2013 02:44:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 02:44:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 25 04:44:29 2013 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 1UrJF6-0001TI-Se for ged-emacs-devel@m.gmane.org; Tue, 25 Jun 2013 04:44:28 +0200 Original-Received: from localhost ([::1]:42615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrJF6-0003QY-Gi for ged-emacs-devel@m.gmane.org; Mon, 24 Jun 2013 22:44:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrJF3-0003QT-G3 for emacs-devel@gnu.org; Mon, 24 Jun 2013 22:44:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrJF2-000725-MZ for emacs-devel@gnu.org; Mon, 24 Jun 2013 22:44:25 -0400 Original-Received: from mail-ie0-x232.google.com ([2607:f8b0:4001:c03::232]:37674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrJF2-000721-Hu for emacs-devel@gnu.org; Mon, 24 Jun 2013 22:44:24 -0400 Original-Received: by mail-ie0-f178.google.com with SMTP id u16so27320899iet.9 for ; Mon, 24 Jun 2013 19:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:organization:references:mail-followup-to :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=5rbBTWZLCdizw5PicdjYnOG5WColsmnA93MMTsfVWjA=; b=trH2kIxqhLAnbnh02VnKgrb8ixXrVfQpiVMP6nvuP4cKz5Bo3KYacvc4DUzp7dMBQJ dhxrR6WqIrj2ymW2CngcKVHLT+aDOXrp0jzzXQQ7UUnvKgKQdeWRQMZFpFXFJa0t/Hdp 5soMUu4AVih/u5J44jOE0O/YQBjuU7/HTDCOHypngV9sQnMlXhm56OAPXqrGy7rX47cx Lis4yxYRu2edKiLPM++XHaa7/BNuCIChGWPRCH2ukhThISMMbAKdo9Ur78W8X0G63fEa 1DaWrQb5qGlqTqHE5YhM36OaRpmDqdSus0LsDTsITudzAZEN11KzbQvdeptGJBO72dbM M0Iw== X-Received: by 10.50.79.169 with SMTP id k9mr4307457igx.20.1372128263911; Mon, 24 Jun 2013 19:44:23 -0700 (PDT) Original-Received: from Vulcan.local (c-98-214-70-173.hsd1.il.comcast.net. [98.214.70.173]) by mx.google.com with ESMTPSA id fu2sm1450498igb.3.2013.06.24.19.44.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Jun 2013 19:44:22 -0700 (PDT) Original-Received: by Vulcan.local (Postfix, from userid 501) id DC69D67FB38C; Mon, 24 Jun 2013 21:44:20 -0500 (CDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (Leo Liu's message of "Tue, 25 Jun 2013 09:21:28 +0800") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (darwin) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::232 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:161003 Archived-At: >>>>> Leo Liu writes: > On 2013-06-25 03:59 +0800, John Wiegley wrote: >> One thing that would help with that is to allow structural pattern >> matching. For example, say I have a function `foo` which returns a list >> '(a b c), but all I care about is that `b` is `b`. Then I could write: >> >> (shouldBe (foo) '(_ b _)) >> >> `shouldBe` then raises an exception if the pattern fails to match. > Use pcase? pcase does not imply an assertion of equality, which the above does. I'm not capturing the second element of the list in a variable named 'b', I'm asserting that the second element is equal to the symbol 'b'. John