www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

test-vector.rkt (1034B)


      1 #lang typed/racket
      2 
      3 (require tr-immutable
      4          typed/rackunit)
      5 (check-pred (make-predicate (IVectorof Positive-Byte)) (ivector 1 2 3))
      6 
      7 (check-equal? (with-output-to-string
      8                (λ ()
      9                  (display (ivector 1 2 3))))
     10               (with-output-to-string
     11                (λ ()
     12                  (display #(1 2 3)))))
     13 
     14 (check-equal? (with-output-to-string
     15                (λ ()
     16                  (write (ivector 1 2 3))))
     17               (with-output-to-string
     18                (λ ()
     19                  (write #(1 2 3)))))
     20 
     21 (check-equal? (with-output-to-string
     22                (λ ()
     23                  (print (ivector 1 2 3) (current-output-port) 0)))
     24               (with-output-to-string
     25                (λ ()
     26                  (print #(1 2 3) (current-output-port) 0))))
     27 
     28 (check-equal? (with-output-to-string
     29                (λ ()
     30                  (print (ivector 1 2 3) (current-output-port) 1)))
     31               (with-output-to-string
     32                (λ ()
     33                  (print #(1 2 3) (current-output-port) 1))))