allow test to run if GL is unavailable

This commit is contained in:
Matthew Flatt 2012-07-15 10:36:36 -06:00
parent 73e901a262
commit 55a8445b0b

View File

@ -577,6 +577,7 @@
(define dc2 (make-object bitmap-dc% bm2))
(define gl1 (send dc1 get-gl-context))
(define gl2 (send dc2 get-gl-context))
(when (and gl1 gl2)
(send gl1 call-as-current
(lambda ()
(test 5 'alt (send gl2 call-as-current
@ -593,7 +594,7 @@
(lambda () 8)))))
(with-handlers ([exn? void])
(send gl1 call-as-current (lambda () (error "fail"))))
(test 12 'post-exn (send gl1 call-as-current (lambda () 12))))
(test 12 'post-exn (send gl1 call-as-current (lambda () 12)))))
;; ----------------------------------------