Move tests for the new bits of racket/sequence
from unstable/sequence
tests.
This commit is contained in:
parent
63b1f0f4aa
commit
8b1859b77d
|
@ -265,6 +265,22 @@
|
|||
(define-sequence-syntax in-X* (lambda () #'in-X) (lambda (stx) #f))
|
||||
(test '(1 2 3) 'kw-seq (for/list ([x (in-X* #:x '(1 2 3))]) x))
|
||||
|
||||
;; ----------------------------------------
|
||||
;; Additional sequence constructors
|
||||
|
||||
(test '(2 4 6)
|
||||
values
|
||||
(for/list ([(x y) (in-pairs '((1 . 1) (2 . 2) (3 . 3)))])
|
||||
(+ x y)))
|
||||
(test #t sequence? (in-slice 1 '()))
|
||||
(test '() values (for/list ([v (in-slice 1 '())]) v))
|
||||
(test '((0 1)) values (for/list ([v (in-slice 3 (in-range 2))]) v))
|
||||
(test '((0 1 2) (3 4 5))
|
||||
values (for/list ([v (in-slice 3 (in-range 6))]) v))
|
||||
(test '((0 1 2) (3 4 5) (6 7))
|
||||
values (for/list ([v (in-slice 3 (in-range 8))]) v))
|
||||
(err/rt-test (for/list ([x (in-slice 0 (in-range 8))]) x) exn:fail:contract?)
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(report-errs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user