From 6734511622f6cc9c625bec6a2ee55413f0689946 Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Fri, 10 Apr 2026 00:39:54 +0100 Subject: Remove useless make-player-entity --- tests/input-test.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/input-test.scm') diff --git a/tests/input-test.scm b/tests/input-test.scm index 2173f61..44af6e8 100644 --- a/tests/input-test.scm +++ b/tests/input-test.scm @@ -125,35 +125,35 @@ (test-equal "entity returned as-is" e out))) (test-group "no actions held: velocity is zero" - (let* ((e (make-player-entity 0 0 16 16)) + (let* ((e (make-entity 0 0 16 16)) (out (apply-input-to-entity e (lambda (a) #f)))) (test-equal "vx is 0" 0 (entity-ref out #:vx)) (test-equal "vy is 0" 0 (entity-ref out #:vy)))) (test-group "right held: vx=2 vy=0" - (let* ((e (make-player-entity 0 0 16 16)) + (let* ((e (make-entity 0 0 16 16)) (out (apply-input-to-entity e (lambda (a) (eq? a 'right))))) (test-equal "vx is 2" 2 (entity-ref out #:vx)) (test-equal "vy is 0" 0 (entity-ref out #:vy)))) (test-group "right+down held: vx=2 vy unchanged" - (let* ((e (make-player-entity 0 0 16 16)) + (let* ((e (make-entity 0 0 16 16)) (out (apply-input-to-entity e (lambda (a) (memv a '(right down)))))) (test-equal "vx is 2" 2 (entity-ref out #:vx)) (test-equal "vy is unchanged (input handler does not set vy)" 0 (entity-ref out #:vy)))) (test-group "right held: facing set to 1" - (let* ((e (make-player-entity 0 0 16 16)) + (let* ((e (make-entity 0 0 16 16)) (out (apply-input-to-entity e (lambda (a) (eq? a 'right))))) (test-equal "facing is 1" 1 (entity-ref out #:facing 0)))) (test-group "left held: facing set to -1" - (let* ((e (make-player-entity 0 0 16 16)) + (let* ((e (make-entity 0 0 16 16)) (out (apply-input-to-entity e (lambda (a) (eq? a 'left))))) (test-equal "facing is -1" -1 (entity-ref out #:facing 0)))) (test-group "no key held: facing retains previous value" - (let* ((e (entity-set (make-player-entity 0 0 16 16) #:facing 1)) + (let* ((e (entity-set (make-entity 0 0 16 16) #:facing 1)) (out (apply-input-to-entity e (lambda (a) #f)))) (test-equal "facing stays 1 when vx=0" 1 (entity-ref out #:facing 0))))) -- cgit v1.2.3