unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] srfi-64: fix double evaluation of test-name
@ 2021-04-02  7:20 Aleix Conchillo Flaqué
  2021-04-02  7:20 ` Aleix Conchillo Flaqué
  0 siblings, 1 reply; 6+ messages in thread
From: Aleix Conchillo Flaqué @ 2021-04-02  7:20 UTC (permalink / raw)
  To: guile-devel

Sorry about the extra noise. The original patch used spaces on the new
lines while testing.scm uses tabs.

Best,

Aleix




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] srfi-64: fix double evaluation of test-name
  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é
  0 siblings, 1 reply; 6+ messages in thread
From: Aleix Conchillo Flaqué @ 2021-04-02  7:20 UTC (permalink / raw)
  To: guile-devel; +Cc: Aleix Conchillo Flaqué

* 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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] srfi-64: fix double evaluation of test-name
  2021-04-02  7:20 ` Aleix Conchillo Flaqué
@ 2021-05-25 19:03   ` Aleix Conchillo Flaqué
  2021-05-29 19:57     ` jakub-w
  0 siblings, 1 reply; 6+ messages in thread
From: Aleix Conchillo Flaqué @ 2021-05-25 19:03 UTC (permalink / raw)
  To: guile-devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] srfi-64: fix double evaluation of test-name
  2021-05-25 19:03   ` Aleix Conchillo Flaqué
@ 2021-05-29 19:57     ` jakub-w
  2021-05-30 15:25       ` Aleix Conchillo Flaqué
  0 siblings, 1 reply; 6+ messages in thread
From: jakub-w @ 2021-05-29 19:57 UTC (permalink / raw)
  To: guile-devel

For srfi-64 you should really post your patches to srfi's mailing list
since Guile uses the reference implementation. There was some discussion
about switching to another one but it didn't happen. (Yet?)

Some relevant links to upstream:
https://github.com/scheme-requests-for-implementation/srfi-64/
https://srfi.schemers.org/srfi-64/




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] srfi-64: fix double evaluation of test-name
  2021-05-29 19:57     ` jakub-w
@ 2021-05-30 15:25       ` Aleix Conchillo Flaqué
  0 siblings, 0 replies; 6+ messages in thread
From: Aleix Conchillo Flaqué @ 2021-05-30 15:25 UTC (permalink / raw)
  To: jakub-w; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

Thanks, I'll check it out!

On Sat, May 29, 2021, 1:55 PM <jakub-w@riseup.net> wrote:

> For srfi-64 you should really post your patches to srfi's mailing list
> since Guile uses the reference implementation. There was some discussion
> about switching to another one but it didn't happen. (Yet?)
>
> Some relevant links to upstream:
> https://github.com/scheme-requests-for-implementation/srfi-64/
> https://srfi.schemers.org/srfi-64/
>
>
>

[-- Attachment #2: Type: text/html, Size: 957 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] srfi-64: fix double evaluation of test-name
@ 2021-04-02  6:04 Aleix Conchillo Flaqué
  0 siblings, 0 replies; 6+ messages in thread
From: Aleix Conchillo Flaqué @ 2021-04-02  6:04 UTC (permalink / raw)
  To: guile-devel; +Cc: Aleix Conchillo Flaqué

* 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..6a257323d 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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-30 15:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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é
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é

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 NNTP newsgroup(s).