fix 2htdp/image for text-only mode and add a test case that
covers improvements from 8fb8f56
This commit is contained in:
parent
56d0aad9fc
commit
e08ffde1b5
|
@ -10,5 +10,8 @@
|
|||
(class* object% (snip-reader<%>)
|
||||
(define/public (read-header vers stream) (void))
|
||||
(define/public (read-snip text? cvers stream)
|
||||
(snipclass-bytes->image (send stream read-raw-bytes '2htdp/image)))
|
||||
(define bytes (send stream read-raw-bytes '2htdp/image))
|
||||
(if text?
|
||||
#"."
|
||||
(snipclass-bytes->image bytes)))
|
||||
(super-new))))
|
||||
|
|
|
@ -2567,7 +2567,8 @@
|
|||
(test (equal? (image-baseline (list-ref washed 2))
|
||||
(image-height (list-ref washed 2)))
|
||||
=>
|
||||
#f))
|
||||
#f)
|
||||
(test washed => (list img1 img2 img3)))
|
||||
|
||||
(test (convertible? (circle 20 "solid" "red")) => #t)
|
||||
(test (bytes? (convert (circle 20 "solid" "red") 'png-bytes)) => #t)
|
||||
|
|
Loading…
Reference in New Issue
Block a user