diff options
| author | Gene Pasquet <dev@etenil.net> | 2026-04-07 19:30:08 +0100 |
|---|---|---|
| committer | Gene Pasquet <dev@etenil.net> | 2026-04-07 19:30:08 +0100 |
| commit | 618ed5fd6f5ae9c9f275c1e3cfb74762d7d51a01 (patch) | |
| tree | 0d634d79f27b97067d423c0ec1a8f62d3cd4b467 /tests/entity-test.scm | |
| parent | 78a924defabc862a7cfa5476091152c1ef5333ee (diff) | |
Added tweens
Diffstat (limited to 'tests/entity-test.scm')
| -rw-r--r-- | tests/entity-test.scm | 19 |
1 files changed, 19 insertions, 0 deletions
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") |
