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=20Conchillo=20Flaqu=C3=A9?= Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] srfi-64: fix double evaluation of test-name Date: Thu, 1 Apr 2021 23:04:23 -0700 Message-ID: <20210402060423.48611-1-aconchillo@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35875"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Apr 02 08:04:45 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 1lSCvF-0009E0-6c for guile-devel@m.gmane-mx.org; Fri, 02 Apr 2021 08:04:45 +0200 Original-Received: from localhost ([::1]:60362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSCvD-0004dU-SU for guile-devel@m.gmane-mx.org; Fri, 02 Apr 2021 02:04:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSCv4-0004dO-2y for guile-devel@gnu.org; Fri, 02 Apr 2021 02:04:34 -0400 Original-Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:55991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSCv2-0004Cw-1P for guile-devel@gnu.org; Fri, 02 Apr 2021 02:04:33 -0400 Original-Received: by mail-pj1-x1030.google.com with SMTP id nh5so43262pjb.5 for ; Thu, 01 Apr 2021 23:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+QPBqsWd2DHSELN1D4Uzo2ge48JfYd99ZqqmDFf2HuU=; b=FmlcdHxTf2iF/VBLaAcDhH2WGTsQUBwf4ePdTKVG7E8hQzzx1oEGbupSDmlGoAFVzU 2R4O7fRigfnzRev4RywlS1A3KnGqSnKKJ2GYPj3/EP6CR+T7WkfwoMgI7sf4SBPRe/6/ WfnmOISTMTycdp6QXTfsfJ31fVHH5jT6KIXNNAttj1wNVUUrM4ZXgQoQ621L4Ifv2xz/ 9dyF3THWOhBdK96Wp+2FFWMcwFdRSc9PUXqALSCBXKwPZig4TQbMKf5nGhvz2mVgPPzT FtAizR7bTDoXjkcUcVlJuBpc9U/a3yf0S+DamN0WuLM9z26UFqDShnGxKc4T5TjghF6+ YYzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+QPBqsWd2DHSELN1D4Uzo2ge48JfYd99ZqqmDFf2HuU=; b=a7WEyFjJWqmQAFOc1480TMrO4VvpSmiygJKcHnMrRYyT390NSl8ZF3zhfhgTXyTlBg qUzW3OE9uPA1oOlOreAS+paN7Ahxsrdz+fEUsNO8vZ1nW/89pL/bVArF7B15bCnjv3Ve D4AUOf3Zl+gxytSyq6lGzkVtQMQ5DZzNwaFOHOf+3hrCwSj8AXOUMHEzQBRw9W8wHHVE 9nsG54EAzwE0dPNBltC14Z2ybdr+KDLtQMG+xWXLKXne5IPduN+G2i3aNmdgjUGgkYj1 5XWB/DnyGTwc27Zl3yMDe3IxtzRo1myX+KrQsmds2nlLpZrtImASt2gshmjUg258ChDJ OGZw== X-Gm-Message-State: AOAM532RoKj40zt6CPDsLFa9PXM27rKPZu/n6lIVr57+bT/7ZJ1fpYyY PJk0DAvIpt+cD3Ev8qPfHe6pviumd7g= X-Google-Smtp-Source: ABdhPJx8MQQEgamm7Hrka4RyEJZ4KtF68btE77Vy5GdHvFZ2MfCt6Lgd3ST0QkFE15+YWxryazHFmg== X-Received: by 2002:a17:90a:ac08:: with SMTP id o8mr2260365pjq.175.1617343469643; Thu, 01 Apr 2021 23:04:29 -0700 (PDT) Original-Received: from localhost (cpe-75-82-162-230.socal.res.rr.com. [75.82.162.230]) by smtp.gmail.com with ESMTPSA id h18sm3537852pgj.51.2021.04.01.23.04.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Apr 2021 23:04:29 -0700 (PDT) X-Mailer: git-send-email 2.31.1 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=aconchillo@gmail.com; helo=mail-pj1-x1030.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, 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:20722 Archived-At: * 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Ʃ --- 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