diff options
author | Daniel Llorens <lloda@sarc.name> | 2021-12-06 13:38:37 +0100 |
---|---|---|
committer | Daniel Llorens <lloda@sarc.name> | 2021-12-06 14:00:03 +0100 |
commit | 5759e37181ae648cc861656b6c75982851ba93fa (patch) | |
tree | 97e66e5402c614e6cdde5937e22abeb53d8301e1 /test-suite | |
parent | 6af3362b059bb132231354ccca7f15c781f50f48 (diff) | |
download | guile-5759e37181ae648cc861656b6c75982851ba93fa.tar.gz |
New function srfi-4-vector-type-size in (srfi srfi-4 gnu)
This patch removes the undocumented function make-srfi-4-vector from
(guile). That function is still exported from (srfi srfi-4 gnu).
* libguile/srfi-4.h (scm_init_srfi_4): Split into scm_bootstrap_srfi_4()
and scm_init_srfi_4(), after the pattern of scm_init_bytevectors() and
scm_bootstrap_bytevectors().
* libguile/init.c: Replace scm_init_srfi_4() call by scm_bootstrap_srfi_4().
* module/srfi/srfi-4.scm: Load newly defined srfi-4 extension. This
provides undocumented make-srfi-4-vector.
* module/srfi/srfi-4/gnu.scm: Export srfi-4-vector-type-size.
* doc/ref/srfi-modules.texi: Document srfi-4-vector-type-size.
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/tests/srfi-4.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/tests/srfi-4.test b/test-suite/tests/srfi-4.test index 707abee3d..b35c493fb 100644 --- a/test-suite/tests/srfi-4.test +++ b/test-suite/tests/srfi-4.test @@ -564,3 +564,20 @@ (s8vector-copy! v 2 #s8(-1 -2 -3 -4 -5)) (equal? #s8(9 7 -1 -2 -3 -4 -5 8) v)))) +(with-test-prefix "srfi-4 type size" + + (pass-if "c64vector" + (= 16 (srfi-4-vector-type-size #c64()))) + + (pass-if "c32vector" + (= 8 (srfi-4-vector-type-size #c32()))) + + (pass-if "f32vector" + (= 4 (srfi-4-vector-type-size #f32()))) + + (pass-if "u16vector" + (= 2 (srfi-4-vector-type-size #u16()))) + + (pass-if "s8vector" + (= 1 (srfi-4-vector-type-size #s8())))) + |