mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-14 16:37:33 +02:00
adding uvector-segment test
This commit is contained in:
parent
a8e35f90fa
commit
5616d2fb87
1 changed files with 4 additions and 3 deletions
|
@ -11,14 +11,15 @@
|
|||
(test '#u32(0 1 2 3 4) (u32vector 0 1 2 3 4))
|
||||
(test '#u32(0 1 2 3 4 5 6 7 8 9)
|
||||
(u32vector-unfold (lambda (i x) (values x (+ x 1))) 10 0))
|
||||
(test '#u32(0 1 2 3 4 5 6) (u32vector-unfold values 7))
|
||||
;; (test '#u32((0 . 4) (1 . 3) (2 . 2) (3 . 1) (4 . 0))
|
||||
;; (u32vector-unfold-right (lambda (i x) (values (cons i x) (+ x 1))) 5 0))
|
||||
(test '#u32(0 1 2 3 4 5 6) (u32vector-unfold values 7 #f))
|
||||
(test a2i (u32vector-copy a2i))
|
||||
(test-assert (not (eqv? a2i (u32vector-copy a2i))))
|
||||
(test '#u32(6 7 8) (u32vector-copy a2i 6))
|
||||
(test '#u32(3 4 5) (u32vector-copy a2i 3 6))
|
||||
(test '#u32(4 3 1) (u32vector-reverse-copy (u32vector 1 3 4)))
|
||||
(test '#u32(1 2 3 4) (u32vector-reverse-copy '#u32(5 4 3 2 1 0) 1 5))
|
||||
(test '(#u32(#x01 #x02) #u32(#x03 #x04))
|
||||
(u32vector-segment #u32(1 2 3 4) 2))
|
||||
(test '#u32(0 1) (u32vector-append '#u32(0) '#u32(1)))
|
||||
(test '#u32(0 1 2 3) (u32vector-append '#u32(0) '#u32(1 2 3)))
|
||||
(test '#u64(0 1 2 3) (u64vector-append '#u64(0) '#u64(1 2 3)))
|
||||
|
|
Loading…
Add table
Reference in a new issue