diff options
| author | Gene Pasquet <dev@etenil.net> | 2026-04-18 05:59:07 +0100 |
|---|---|---|
| committer | Gene Pasquet <dev@etenil.net> | 2026-04-18 05:59:07 +0100 |
| commit | 84f251ee6e829d33a4f29aa4043924023a378724 (patch) | |
| tree | ab03d18fa192303bf2e1758743ac16c11d9da87f /tests/entity-test.scm | |
| parent | c2085be2dd2a0cb3da05991847e35080915e547e (diff) | |
Re-format
Diffstat (limited to 'tests/entity-test.scm')
| -rw-r--r-- | tests/entity-test.scm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/entity-test.scm b/tests/entity-test.scm index 1e3ab19..c7bcd2d 100644 --- a/tests/entity-test.scm +++ b/tests/entity-test.scm @@ -20,18 +20,18 @@ ;; Test with default value (let ((entity '((#:type . player)))) (test "returns default for missing key" - 99 - (entity-ref entity #:x 99)) + 99 + (entity-ref entity #:x 99)) (test "returns #f as default if not specified" - #f - (entity-ref entity #:missing-key)))) + #f + (entity-ref entity #:missing-key)))) ;; Test: entity-ref with procedure as default (test-group "entity-ref-with-procedure-default" (let ((entity '((#:type . player)))) (test "calls procedure default when key missing" - 42 - (entity-ref entity #:x (lambda () 42))))) + 42 + (entity-ref entity #:x (lambda () 42))))) ;; Test: make-player-entity creates valid player entity (test-group "make-entity" @@ -51,8 +51,8 @@ (let ((no-type '((#:x . 100) (#:y . 200)))) (test "returns #f for entity without type" - #f - (entity-type no-type)))) + #f + (entity-type no-type)))) ;; Test: complex entity with multiple properties (test-group "complex-entity" @@ -128,19 +128,19 @@ (test "skipped" 0 (entity-ref (fixture-pipeline #f e 0) #:x)))) (define-pipeline (guarded-pipeline guarded-skip) (scene_ ent _dt) - guard: (entity-ref ent #:active? #f) + guard: (entity-ref ent #:active? #f) (entity-set ent #:x 99)) (test-group "define-pipeline with guard:" (let ((e '((#:type . t) (#:x . 0) (#:active? . #t)))) (test "runs body when guard passes" 99 - (entity-ref (guarded-pipeline #f e 0) #:x))) + (entity-ref (guarded-pipeline #f e 0) #:x))) (let ((e '((#:type . t) (#:x . 0)))) (test "returns entity unchanged when guard fails" 0 - (entity-ref (guarded-pipeline #f e 0) #:x))) + (entity-ref (guarded-pipeline #f e 0) #:x))) (let ((e '((#:type . t) (#:x . 0) (#:active? . #t) (#:skip-pipelines . (guarded-skip))))) (test "skip-pipelines takes precedence over guard" 0 - (entity-ref (guarded-pipeline #f e 0) #:x)))) + (entity-ref (guarded-pipeline #f e 0) #:x)))) (test-end "entity") (test-exit) |
