summaryrefslogtreecommitdiff
path: root/test-suite/tests/bitvectors.test
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2014-06-28 15:24:29 +0200
committerAndy Wingo <wingo@pobox.com>2014-06-29 14:19:00 +0200
commitd40b05386c72c5a17734ee3fd58e35e931ac46ef (patch)
treebc1b197b299cc4c65d6b177d6d4e1e0f23177fd6 /test-suite/tests/bitvectors.test
parentec412d75627aeffbd816ac351eabcd1b533540c6 (diff)
downloadguile-d40b05386c72c5a17734ee3fd58e35e931ac46ef.tar.gz
Fix bit-count* bug
* libguile/bitvectors.c (scm_bit_count_star): Fix typo introduced in 2005 refactor (!) in which the second arg was erroneously taken from the first arg. * test-suite/tests/bitvectors.test: Add test. * doc/ref/api-compound.texi: Fix doc example for u32vector selector.
Diffstat (limited to 'test-suite/tests/bitvectors.test')
-rw-r--r--test-suite/tests/bitvectors.test4
1 files changed, 4 insertions, 0 deletions
diff --git a/test-suite/tests/bitvectors.test b/test-suite/tests/bitvectors.test
index 8541576aa..d9dfa136d 100644
--- a/test-suite/tests/bitvectors.test
+++ b/test-suite/tests/bitvectors.test
@@ -70,3 +70,7 @@
(let ((v (bitvector #t #t #f #f)))
(bit-set*! v #*101 #f)
(equal? v #*0100))))
+
+(with-test-prefix "bit-count*"
+ (pass-if-equal 3 (bit-count* #*01110111 #*11001101 #t))
+ (pass-if-equal 2 (bit-count* #*01110111 #u32(7 0 4) #f)))