racket/draw and racket/snip: avoid some undefined-checking wrappers

The changes to `pen%` and `brush%` are related to the
`racket/class` repair of the previous commit, while the
`style%` change is because I didn't look at it before.

original commit: fd67feddab577f8e756c78a9c2b89a9b4a66dbb5
This commit is contained in:
Matthew Flatt 2014-08-06 08:48:19 +01:00
parent 3de4b74d6b
commit fe9f9afffd
2 changed files with 17 additions and 0 deletions
pkgs/gui-pkgs/gui-test/tests/gracket

View File

@ -843,6 +843,13 @@
(st #f (make-bitmap 1000000 1000000) ok?)
;; ----------------------------------------
;; No #<unsafe-undefined> checks on certain class instances
(test #f 'undef-pen (impersonator? (new pen%)))
(test #f 'undef-brush (impersonator? (new brush%)))
(test #f 'undef-color (impersonator? (new color%)))
;; ----------------------------------------
(report-errs)

View File

@ -649,6 +649,16 @@
(unless (<= 0 count2 (/ N 2))
(error 'notifications "not weak enough? ~e" count2)))
;; ----------------------------------------
;; No #<unsafe-undefined> checks on certain class instances
(test #f 'undef-snip (impersonator? (new snip%)))
(test #f 'undef-string-snip% (impersonator? (new string-snip%)))
(test #f 'undef-tab-snip% (impersonator? (new tab-snip%)))
(test #f 'undef-image-snip% (impersonator? (new image-snip%)))
(test #f 'undef-style-delta% (impersonator? (new style-delta%)))
(test #f 'undef-style<%> (impersonator? (send (new style-list%) basic-style)))
;; ----------------------------------------
(report-errs)