AtlatestRepositorysigil-desktop
sigil-desktop / tree / testtest-window.sgl
1
;;; The window calls (0.11.0; window-focused?, 0.14.0) answer safely2
;;; before (and without) a window: a program can call them from init, or3
;;; from a headless test, and get #f rather than a crash. With a window4
;;; open they are test-window-live.sgl's and test-focus-live.sgl's.6
(import (sigil test)7
(sigil desktop))9
(test-group "the window, with no window open"10
(test "fullscreen? is #f"11
(assert-false (fullscreen?)))12
(test "monitor-size is #f"13
(assert-false (monitor-size)))14
(test "window-set-size! is #f"15
(assert-false (window-set-size! 800 352)))16
(test "set-fullscreen! is #f, on or off"17
(assert-false (set-fullscreen! #t))18
(assert-false (set-fullscreen! #f)))19
(test "window-width and window-height are #f"20
(assert-false (window-width))21
(assert-false (window-height)))22
(test "window-focused? is #f"23
(assert-false (window-focused?))))