(use test sdl) (test-begin "sdl") ;; Segfaults if not linked with SDL_image ;; Also should return #f and not an sdl-surface with pointer to #f (test #f (img-load "non-existing image file.png")) (test #t (and (sdl-linked-version) #t)) (test #t (and (sdl-compiled-version) #t)) (test #t (and (ttf-linked-version) #t)) (test #t (and (ttf-compiled-version) #t)) (let [(v (sdl-linked-version))] (test #t (sdl-version-at-least v (sdl-version-major v) (sdl-version-minor v) (sdl-version-patch v))) (test #f (sdl-version-at-least v (sdl-version-major v) (sdl-version-minor v) (add1 (sdl-version-patch v)))) (test #t (sdl-version-at-least v (sdl-version-major v) (sdl-version-minor v) (sub1 (sdl-version-patch v))))) (test-end "sdl")