You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/pitfall/page-test.rkt

18 lines
612 B
Racket

#lang racket/base
(require racket/class
rackunit
racket/dict
"pdf.rkt"
"page.rkt"
"reference.rkt"
"core.rkt"
sugar/unstable/js)
(define p (make-page))
(check-equal? ($page-height p) 792.0)
(check-equal? ($page-width p) 612.0)
(check-equal? (dict-ref ($page-resources p) 'ProcSet) '(PDF Text ImageB ImageC ImageI))
(check-equal? (dict-ref ($page-ref p) 'Type) 'Page)
(check-equal? (dict-ref ($page-ref p) 'MediaBox) '(0 0 612.0 792.0))
(check-true ($ref? (dict-ref ($page-ref p) 'Contents)))
(check-true ($ref? (dict-ref ($page-ref p) 'Resources)))