From 618ed5fd6f5ae9c9f275c1e3cfb74762d7d51a01 Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Tue, 7 Apr 2026 19:30:08 +0100 Subject: Added tweens --- tests/entity-test.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/entity-test.scm') diff --git a/tests/entity-test.scm b/tests/entity-test.scm index 5df8e76..988d1c9 100644 --- a/tests/entity-test.scm +++ b/tests/entity-test.scm @@ -113,4 +113,23 @@ (test-equal "right dvx" 2 (car (cdr (assq 'right imap)))) (test-equal "right dvy" 0 (cdr (cdr (assq 'right imap)))))) +(test-group "entity-skips-pipeline?" + (test-assert "absent skip list" + (not (entity-skips-pipeline? '(#:type a) 'gravity))) + (test-assert "empty skip list" + (not (entity-skips-pipeline? '(#:skip-pipelines ()) 'gravity))) + (test-assert "member" + (entity-skips-pipeline? '(#:skip-pipelines (gravity velocity-x)) 'gravity)) + (test-assert "not member" + (not (entity-skips-pipeline? '(#:skip-pipelines (gravity)) 'velocity-x)))) + +(define-pipeline (fixture-pipeline fixture-skip) (ent) + (entity-set ent #:x 42)) + +(test-group "define-pipeline" + (let ((e '(#:type t #:x 0))) + (test-equal "runs body" 42 (entity-ref (fixture-pipeline e) #:x))) + (let ((e '(#:type t #:x 0 #:skip-pipelines (fixture-skip)))) + (test-equal "skipped" 0 (entity-ref (fixture-pipeline e) #:x)))) + (test-end "entity") -- cgit v1.2.3