diff options
Diffstat (limited to 'tests/entity-test.scm')
| -rw-r--r-- | tests/entity-test.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/entity-test.scm b/tests/entity-test.scm index 270555c..9c7607c 100644 --- a/tests/entity-test.scm +++ b/tests/entity-test.scm @@ -79,6 +79,16 @@ (test-equal "existing key untouched" 10 (entity-ref e #:x)) (test-equal "list grows by one pair" 4 (length e))))) +(test-group "entity-set-many" + (test-group "Set multiple entities with lists" + (let ((e (entity-set-many '(#:x 10 #:y 20) '((#:x 15) (#:y 25))))) + (test-equal "value x updated" (entity-ref e #:x) 15) + (test-equal "value y updated" (entity-ref e #:y) 25))) + (test-group "Set multiple entities with cons" + (let ((e (entity-set-many '(#:x 10 #:y 20) (list (cons #:x 15) (cons #:y 25))))) + (test-equal "value x updated" (entity-ref e #:x) 15) + (test-equal "value y updated" (entity-ref e #:y) 25)))) + ;; Test: entity-update applies transformations (test-group "entity-update" (test-group "transform existing value" |
