From: "Aleix Conchillo Flaqué" <aconchillo@gmail.com>
To: guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] srfi-64: fix double evaluation of test-name
Date: Tue, 25 May 2021 12:03:45 -0700 [thread overview]
Message-ID: <CA+XASoWwoTgqW_0T__m3FjxLiDBWLPnAWKRkYOxnmnBEh4DwOQ@mail.gmail.com> (raw)
In-Reply-To: <20210402072033.65809-2-aconchillo@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4019 bytes --]
ping!
On Fri, Apr 2, 2021, 12:21 AM Aleix Conchillo Flaqué <aconchillo@gmail.com>
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é <aconchillo@gmail.com>
> ---
> 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= 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
>
>
[-- Attachment #2: Type: text/html, Size: 4928 bytes --]
next prev parent reply other threads:[~2021-05-25 19:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-02 7:20 [PATCH] srfi-64: fix double evaluation of test-name Aleix Conchillo Flaqué
2021-04-02 7:20 ` Aleix Conchillo Flaqué
2021-05-25 19:03 ` Aleix Conchillo Flaqué [this message]
2021-05-29 19:57 ` jakub-w
2021-05-30 15:25 ` Aleix Conchillo Flaqué
-- strict thread matches above, loose matches on Subject: below --
2021-04-02 6:04 Aleix Conchillo Flaqué
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+XASoWwoTgqW_0T__m3FjxLiDBWLPnAWKRkYOxnmnBEh4DwOQ@mail.gmail.com \
--to=aconchillo@gmail.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).