avoid re-generating some bitmaps on test

This commit is contained in:
Matthew Flatt 2014-06-16 14:37:34 +01:00
parent fecaf5127d
commit 1c9db0d07c
2 changed files with 5 additions and 13 deletions

View File

@ -62,17 +62,7 @@
(define pdf-bitmap (mk-bitmap draw1))
(define html-bitmap (mk-bitmap draw2))
(begin
(module+ main
(send pdf-bitmap save-file "../pdf.png" 'png)
(send html-bitmap save-file "../html.png" 'png))
(match (current-command-line-arguments)
[(vector "skip") (void)]
[_ (send f show #t)])
;; Test mode:
(module test racket/base
(require syntax/location)
(parameterize ([current-command-line-arguments (vector "skip")])
(dynamic-require (quote-module-path "..") #f)))
(send html-bitmap save-file "../html.png" 'png)
(send f show #t))

View File

@ -3,6 +3,8 @@
(require racket/gui
racket/math)
(module test racket/base)
(define SIZE 24)
(define bm (make-object bitmap% SIZE SIZE))