aboutsummaryrefslogtreecommitdiff
path: root/tests/animation-test.scm
diff options
context:
space:
mode:
authorGene Pasquet <dev@etenil.net>2026-04-12 23:00:17 +0100
committerGene Pasquet <dev@etenil.net>2026-04-12 23:00:17 +0100
commite29143f891ea0f25480c9e2b2c5b765f0b343bff (patch)
tree9411ae4be8f3d7523d89ba2d6327d0e4c9f189fe /tests/animation-test.scm
parent893d1b17ef63b7e2e9d4f6c9dd70c07b61c7bc59 (diff)
Fix animation test, simplify a let* to a let
Diffstat (limited to 'tests/animation-test.scm')
-rw-r--r--tests/animation-test.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/animation-test.scm b/tests/animation-test.scm
index 9a71dec..87b18e7 100644
--- a/tests/animation-test.scm
+++ b/tests/animation-test.scm
@@ -20,7 +20,8 @@
(test-group "frame->duration"
(test-equal "first frame, frames (0)" 100 (frame->duration '((0 100)) 0))
(test-equal "wraps around" 100 (frame->duration '((0 100) (1 200)) 2))
- (test-equal "frame 1 of (27 28)" 200 (frame->duration '((27 100) (28 200)) 1)))
+ (test-equal "frame 1 of (27 28)" 200 (frame->duration '((27 100) (28 200)) 1))
+)
(test-group "set-animation"
(let ((entity (list #:type 'player #:anim-name 'idle #:anim-frame 5 #:anim-tick 8)))
@@ -57,10 +58,10 @@
(test-group "animated entity"
(let* ((anims '((#:name walk #:frames (2 3) #:duration 4)))
(entity (list #:type 'player #:anim-name 'walk #:anim-frame 0 #:anim-tick 0 #:animations anims))
- (stepped-entity (apply-animation entity #f 10)))
+ (stepped-entity (apply-animation #f entity 10)))
(test-equal "Updated animated entity" 1 (entity-ref stepped-entity #:anim-tick)))
(let* ((entity (list #:type 'static))
- (stepped-entity (apply-animation entity #f 10)))
+ (stepped-entity (apply-animation #f entity 10)))
(test-equal "unchanged static entity" #f (entity-ref stepped-entity #:anim-tick)))))
(test-end "animation")