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; 3+ 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] 3+ 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é
  0 siblings, 0 replies; 3+ 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] 3+ messages in thread

* [PATCH] srfi-64: fix double evaluation of test-name
@ 2021-04-02  6:04 Aleix Conchillo Flaqué
  0 siblings, 0 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2021-04-02  7:20 UTC | newest]

Thread overview: 3+ 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é
  -- strict thread matches above, loose matches on Subject: below --
2021-04-02  6:04 Aleix Conchillo Flaqué

unofficial mirror of guile-devel@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-devel/0 guile-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-devel guile-devel/ https://yhetil.org/guile-devel \
		guile-devel@gnu.org
	public-inbox-index guile-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.devel
	nntp://news.gmane.io/gmane.lisp.guile.devel


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git