[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 04/04: tests/distributed-hash-table: Simplify nested 'le
From: |
gnunet |
Subject: |
[gnunet-scheme] 04/04: tests/distributed-hash-table: Simplify nested 'let*' forms. |
Date: |
Thu, 03 Feb 2022 13:52:34 +0100 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit 441aaec8e1137ffafe0bc488bb969ecc242c1cab
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Thu Feb 3 12:51:31 2022 +0000
tests/distributed-hash-table: Simplify nested 'let*' forms.
* tests/distributed-hash-table.scm
("copy-datum: equal and independent")
("copy-search-result: equal and independent"): Simplify.
---
tests/distributed-hash-table.scm | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tests/distributed-hash-table.scm b/tests/distributed-hash-table.scm
index 5f60c00..193b295 100644
--- a/tests/distributed-hash-table.scm
+++ b/tests/distributed-hash-table.scm
@@ -293,10 +293,10 @@
;; can return #true.
(let* ((old-key (make-slice/read-write* (sizeof /hashcode:512 '())))
(old-value (make-slice/read-write* 70))
- (old (make-a-datum #:key old-key #:value old-value #:expiration 777)))
- (let ((new (copy-datum old)))
- (and (datum=? old new)
- (datum-independent? old new)))))
+ (old (make-a-datum #:key old-key #:value old-value #:expiration 777))
+ (new (copy-datum old)))
+ (and (datum=? old new)
+ (datum-independent? old new))))
(define (path-length->size l)
(* l (sizeof /dht:path-element '())))
@@ -306,13 +306,13 @@
(let* ((old-key (make-slice/read-write* (sizeof /hashcode:512 '())))
(old-value (make-slice/read-write* 70))
(old-get-path (make-slice/read-write* (path-length->size 5)))
- (old-put-path (make-slice/read-write* (path-length->size 9))))
- (let* ((old-datum (make-a-datum #:value old-value #:expiration 555))
- (old (datum->search-result old-datum #:get-path old-get-path
- #:put-path old-put-path))
- (new (copy-search-result old)))
- (and (search-result=? old new)
- (search-result-independent? old new)))))
+ (old-put-path (make-slice/read-write* (path-length->size 9)))
+ (old-datum (make-a-datum #:value old-value #:expiration 555))
+ (old (datum->search-result old-datum #:get-path old-get-path
+ #:put-path old-put-path))
+ (new (copy-search-result old)))
+ (and (search-result=? old new)
+ (search-result-independent? old new))))
(test-assert "copy-insertion: equal and independent"
(let* ((old-value (make-slice/read-write* 71))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.