[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 01/03: tests/bv-slice: Fix slice-zero! tests.
From: |
gnunet |
Subject: |
[gnunet-scheme] 01/03: tests/bv-slice: Fix slice-zero! tests. |
Date: |
Sun, 16 Jan 2022 18:35:54 +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 3f0fe4d1b6d1a967a232d8093c9af9ea8b846ea9
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Jan 12 17:36:56 2022 +0100
tests/bv-slice: Fix slice-zero! tests.
Previously, they actually indirectly tested that slice-zero! returns
zero values. If the bug in SRFI-64 was fixed in the version of Guile
in use, the tests would have failed.
* tests/bv-slice.scm
("slice-zero! requires writability","even if the length is zero"):
Use 'test-missing-caps' instead of the buggy and more general
test-error. Make slices read-only instead of write-only.
---
tests/bv-slice.scm | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/tests/bv-slice.scm b/tests/bv-slice.scm
index 9ccf765..4daef84 100644
--- a/tests/bv-slice.scm
+++ b/tests/bv-slice.scm
@@ -97,13 +97,19 @@
(slice-zero! dest)
(slice-bv dest)))
-(test-error "slice-zero! requires writability"
- &assertion
- (slice-zero! (slice/write-only (make-slice/read-write 9))))
+(test-missing-caps
+ "slice-zero! requires writability"
+ 'slice
+ CAP_READ
+ CAP_WRITE
+ (slice-zero! (slice/read-only (make-slice/read-write 9))))
-(test-error "even if the length is zero"
- &assertion
- (slice-zero! (slice/write-only (make-slice/read-write 0))))
+(test-missing-caps
+ "even if the length is zero"
+ 'slice
+ CAP_READ
+ CAP_WRITE
+ (slice-zero! (slice/read-only (make-slice/read-write 0))))
(define (some-numbers N)
(map (cut expt 2 <>) (iota N)))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.