From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] srfi-64: fix double evaluation of test-name Date: Tue, 25 May 2021 12:03:45 -0700 Message-ID: References: <20210402072033.65809-1-aconchillo@gmail.com> <20210402072033.65809-2-aconchillo@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000023368605c32c300f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32464"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue May 25 21:04:13 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llcLd-0008Hd-Cr for guile-devel@m.gmane-mx.org; Tue, 25 May 2021 21:04:13 +0200 Original-Received: from localhost ([::1]:46284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llcLc-00047t-Bw for guile-devel@m.gmane-mx.org; Tue, 25 May 2021 15:04:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llcLR-00047I-AG for guile-devel@gnu.org; Tue, 25 May 2021 15:04:01 -0400 Original-Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:36650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llcLP-0006NO-AM for guile-devel@gnu.org; Tue, 25 May 2021 15:04:01 -0400 Original-Received: by mail-pg1-x535.google.com with SMTP id 27so22207607pgy.3 for ; Tue, 25 May 2021 12:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=UX0tAxyTbfpFfdzZgVXCyMRyMDJD7Gz2czumILmknMY=; b=CI9rBRK4SiTrg8WWnLU1b1/jjHG3P2CuwfqPzgzWh4W4FgzwFtIxOSEzdGkDuFgURJ tNKeJAMVpT0aa2RKWXfHuI7CDOO2f4ifk1+ah43rCb9Tg6qojdNEA1ol/d65KiW1y/8d CYZmZ6RNNwmF/6ytFQ09Eht0tBlWx68+stfOhrewN2ubPhd877iMXKJ/eGRvc6RpbW6D u+jbS2A3firYoL85IPM3yXhqb4hpiO0tG0nh7V9FHXxtXK6beePWNhXODfsFbB7CijIl cIgf8RDa7/g9etY47BKZDLmhUWZh7l7nAMFpsqjaITtslgXO4aas9La/azkq0+Y5tzXV Y8/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=UX0tAxyTbfpFfdzZgVXCyMRyMDJD7Gz2czumILmknMY=; b=iBvl6Fuq7i7F4HZQIwYV/cvi0Cs7rCcQ3S6kyPDzxWKJHYYh3WiOIbId7qFJJrG1dm g5l999et1v8bpro/BqM9VcDdhCvR+xf3yowpBD/lQKBIfYRxoQa2A90AefyIq0w28UBV PdGRiizENIXO9t0pD25Odjp1udfFZI+QAD0hskwyE6sAATbU+4cZAnwu+c52dSTznml2 4N8d7GWFL5Qq3nzJi6N8Y4CLyXkveOl5aYwVUZMkKOCFN+yQpgvqLEZhheoyJxAG4eHE il/FAzmBmoO6IbUOzIR9/pK8VlmLkLSOR2TjfZ2QsdCzYL9eTLWeDC7yrGeVszz9S6vf oKHw== X-Gm-Message-State: AOAM530pk1V4GHxAALP1CO1CsnsS963hNrCNRiHvOczX3IlRz5dtLO5F NRuHN0mKHcqOvSF2U0fGbk8jmR/bXoKN2lrsEEeBH23lcH0= X-Google-Smtp-Source: ABdhPJzWBErE5F6JEV7RrrbdFHpxI3dQMqC787gtiZ1l3u+CiQG7YYtVFiynBImmU9G/Uir/AjB0lN5bXxj/xfILhnk= X-Received: by 2002:a65:625a:: with SMTP id q26mr13451801pgv.311.1621969437143; Tue, 25 May 2021 12:03:57 -0700 (PDT) In-Reply-To: <20210402072033.65809-2-aconchillo@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=aconchillo@gmail.com; helo=mail-pg1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20777 Archived-At: --00000000000023368605c32c300f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ping! On Fri, Apr 2, 2021, 12:21 AM Aleix Conchillo Flaqu=C3=A9 wrote: > * module/srfi/srfi-64/testing.scm: fix double test-name evaluation which > also fix unused variable warnings as a bonus. > > Signed-off-by: Aleix Conchillo Flaqu=C3=A9 > --- > module/srfi/srfi-64/testing.scm | 36 ++++++++++++++++----------------- > 1 file changed, 18 insertions(+), 18 deletions(-) > > diff --git a/module/srfi/srfi-64/testing.scm > b/module/srfi/srfi-64/testing.scm > index 37792cd0f..4237a5614 100644 > --- a/module/srfi/srfi-64/testing.scm > +++ b/module/srfi/srfi-64/testing.scm > @@ -707,9 +707,9 @@ > (syntax-case (list x (list (syntax quote) (%test-source-line2 x))) > () > (((mac tname expr) line) > (syntax > - (let* ((r (test-runner-get)) > - (name tname)) > - (test-result-alist! r (cons (cons 'test-name tname) line)) > + (let* ((name tname) > + (r (test-runner-get))) > + (test-result-alist! r (cons (cons 'test-name name) line)) > (%test-comp1body r expr)))) > (((mac expr) line) > (syntax > @@ -720,9 +720,9 @@ > (syntax-case (list x (list (syntax quote) (%test-source-line2 x)) > comp) () > (((mac tname expected expr) line comp) > (syntax > - (let* ((r (test-runner-get)) > - (name tname)) > - (test-result-alist! r (cons (cons 'test-name tname) line)) > + (let* ((name tname) > + (r (test-runner-get))) > + (test-result-alist! r (cons (cons 'test-name name) line)) > (%test-comp2body r comp expected expr)))) > (((mac expected expr) line comp) > (syntax > @@ -740,9 +740,9 @@ > (syntax-case (list x (list (syntax quote) (%test-source-line2 x))) > () > (((mac tname expected expr error) line) > (syntax > - (let* ((r (test-runner-get)) > - (name tname)) > - (test-result-alist! r (cons (cons 'test-name tname) line)) > + (let* ((name tname) > + (r (test-runner-get))) > + (test-result-alist! r (cons (cons 'test-name name) line)) > (%test-comp2body r (%test-approximate=3D error) expected expr))= )) > (((mac expected expr error) line) > (syntax > @@ -759,9 +759,9 @@ > (define-syntax test-assert > (syntax-rules () > ((test-assert tname test-expression) > - (let* ((r (test-runner-get)) > - (name tname)) > - (test-result-alist! r '((test-name . tname))) > + (let* ((name tname) > + (r (test-runner-get))) > + (test-result-alist! r '((test-name . name))) > (%test-comp1body r test-expression))) > ((test-assert test-expression) > (let* ((r (test-runner-get))) > @@ -770,9 +770,9 @@ > (define-syntax %test-comp2 > (syntax-rules () > ((%test-comp2 comp tname expected expr) > - (let* ((r (test-runner-get)) > - (name tname)) > - (test-result-alist! r (list (cons 'test-name tname))) > + (let* ((name tname) > + (r (test-runner-get))) > + (test-result-alist! r (list (cons 'test-name name))) > (%test-comp2body r comp expected expr))) > ((%test-comp2 comp expected expr) > (let* ((r (test-runner-get))) > @@ -895,9 +895,9 @@ > (syntax-case (list x (list (syntax quote) (%test-source-line2 x))) > () > (((mac tname etype expr) line) > (syntax > - (let* ((r (test-runner-get)) > - (name tname)) > - (test-result-alist! r (cons (cons 'test-name tname) line)) > + (let* ((name tname) > + (r (test-runner-get))) > + (test-result-alist! r (cons (cons 'test-name name) line)) > (%test-error r etype expr)))) > (((mac etype expr) line) > (syntax > -- > 2.31.1 > > --00000000000023368605c32c300f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
ping!

On Fri, Apr 2, 2021, 12:21 AM Aleix Conchillo Flaqu= =C3=A9 <aconchillo@gmail.com= > wrote:
* module/srfi/srfi-64/t= esting.scm: fix double test-name evaluation which
also fix unused variable warnings as a bonus.

Signed-off-by: Aleix Conchillo Flaqu=C3=A9 <aconchillo@gmail.com&g= t;
---
=C2=A0module/srfi/srfi-64/testing.scm | 36 ++++++++++++++++----------------= -
=C2=A01 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/module/srfi/srfi-64/testing.scm b/module/srfi/srfi-64/testing.= scm
index 37792cd0f..4237a5614 100644
--- a/module/srfi/srfi-64/testing.scm
+++ b/module/srfi/srfi-64/testing.scm
@@ -707,9 +707,9 @@
=C2=A0 =C2=A0 =C2=A0 =C2=A0(syntax-case (list x (list (syntax quote) (%test= -source-line2 x))) ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (((mac tname expr) line)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(syntax
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((r (test-runner-get))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (name tname))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(test-result-alist! r (cons (cons= 'test-name tname) line))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((name tname)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (r (test-runner-ge= t)))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(test-result-alist! r (cons (cons= 'test-name name) line))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (%test-comp1body r expr))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (((mac expr) line)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(syntax
@@ -720,9 +720,9 @@
=C2=A0 =C2=A0 =C2=A0(syntax-case (list x (list (syntax quote) (%test-source= -line2 x)) comp) ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0(((mac tname expected expr) line comp)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (syntax
-=C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((r (test-runner-get))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (name tname))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(test-result-alist! r (cons (cons 't= est-name tname) line))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((name tname)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (r (test-runner-get))) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(test-result-alist! r (cons (cons 't= est-name name) line))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (%test-comp2body r comp expected expr)))= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0(((mac expected expr) line comp)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (syntax
@@ -740,9 +740,9 @@
=C2=A0 =C2=A0 =C2=A0 =C2=A0(syntax-case (list x (list (syntax quote) (%test= -source-line2 x))) ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0(((mac tname expected expr error) line)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (syntax
-=C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((r (test-runner-get))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (name tname))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(test-result-alist! r (cons (cons 't= est-name tname) line))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((name tname)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (r (test-runner-get))) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(test-result-alist! r (cons (cons 't= est-name name) line))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (%test-comp2body r (%test-approximate=3D= error) expected expr))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(((mac expected expr error) line)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (syntax
@@ -759,9 +759,9 @@
=C2=A0 =C2=A0(define-syntax test-assert
=C2=A0 =C2=A0 =C2=A0(syntax-rules ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0((test-assert tname test-expression)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((r (test-runner-get))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(name tname))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 (test-result-alist! r '((test-name . tname= )))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((name tname)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r (test-runner-get)))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 (test-result-alist! r '((test-name . name)= ))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(%test-comp1body r test-expression)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0((test-assert test-expression)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (let* ((r (test-runner-get)))
@@ -770,9 +770,9 @@
=C2=A0 =C2=A0(define-syntax %test-comp2
=C2=A0 =C2=A0 =C2=A0(syntax-rules ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0((%test-comp2 comp tname expected expr)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((r (test-runner-get))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(name tname))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 (test-result-alist! r (list (cons 'test-na= me tname)))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((name tname)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r (test-runner-get)))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 (test-result-alist! r (list (cons 'test-na= me name)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(%test-comp2body r comp expected expr)))<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0((%test-comp2 comp expected expr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (let* ((r (test-runner-get)))
@@ -895,9 +895,9 @@
=C2=A0 =C2=A0 =C2=A0 =C2=A0(syntax-case (list x (list (syntax quote) (%test= -source-line2 x))) ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (((mac tname etype expr) line)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(syntax
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((r (test-runner-get))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (name tname))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(test-result-alist! r (cons (cons= 'test-name tname) line))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((name tname)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (r (test-runner-ge= t)))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(test-result-alist! r (cons (cons= 'test-name name) line))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (%test-error r etype expr))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (((mac etype expr) line)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(syntax
--
2.31.1

--00000000000023368605c32c300f--