aboutsummaryrefslogtreecommitdiff
path: root/tests/world-test.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/world-test.scm')
-rw-r--r--tests/world-test.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/world-test.scm b/tests/world-test.scm
index 90c26c4..b8c1a98 100644
--- a/tests/world-test.scm
+++ b/tests/world-test.scm
@@ -98,7 +98,15 @@
(let ((scene (make-scene entities: '() tilemap: #f camera-target: #f)))
(test-assert "scene is a record" (scene? scene))
(test-equal "entities list is empty" '() (scene-entities scene))
- (test-equal "tilemap is #f" #f (scene-tilemap scene))))
+ (test-equal "tilemap is #f" #f (scene-tilemap scene))
+ (test-equal "background defaults to #f" #f (scene-background scene))
+ (test-equal "tileset defaults to #f" #f (scene-tileset scene)))
+ (let ((s (make-scene entities: '() tilemap: #f camera-target: #f
+ background: '(40 44 52))))
+ (test-equal "background RGB stored" '(40 44 52) (scene-background s)))
+ (let ((s (make-scene entities: '() tilemap: #f camera-target: #f
+ background: '(1 2 3 200))))
+ (test-equal "background RGBA stored" '(1 2 3 200) (scene-background s))))
;; Test: scene with entities and tilemap
(test-group "scene-with-data"