diff options
author | Andy Wingo <wingo@pobox.com> | 2014-06-28 15:24:29 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-07-04 16:52:29 +0200 |
commit | d40752513fff3306bed31e40721e627720b2f8ff (patch) | |
tree | 247eabe06b562820ef1acd912dbb022c7f13b402 /test-suite | |
parent | f184e887a6cb09a97cf34feab30eeba4a28a3ae4 (diff) | |
download | guile-d40752513fff3306bed31e40721e627720b2f8ff.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')
-rw-r--r-- | test-suite/tests/bitvectors.test | 4 |
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))) |