Contract was too strict
This commit is contained in:
parent
40e1ba95fc
commit
758b944996
|
@ -4,12 +4,15 @@
|
|||
|
||||
(define name (gensym))
|
||||
(define cp (make-byte-counting-port name))
|
||||
(define (test-cp cp)
|
||||
(for/fold ([l 0])
|
||||
([i (in-range 100)])
|
||||
(define n (random 25))
|
||||
(test
|
||||
(file-position cp) => l
|
||||
(write-bytes (make-bytes n) cp))
|
||||
(+ l n)))
|
||||
(test
|
||||
(object-name cp) => name
|
||||
(for/fold ([l 0])
|
||||
([i (in-range 100)])
|
||||
(define n (random 25))
|
||||
(test
|
||||
(file-position cp) => l
|
||||
(write-bytes (make-bytes n) cp))
|
||||
(+ l n)))
|
||||
(test-cp cp)
|
||||
(test-cp (make-byte-counting-port)))
|
|
@ -14,4 +14,4 @@
|
|||
get-location))
|
||||
|
||||
(provide/contract
|
||||
[make-byte-counting-port (any/c . -> . output-port?)])
|
||||
[make-byte-counting-port (() (any/c) . ->* . output-port?)])
|
Loading…
Reference in New Issue
Block a user