Add tests for component retrieval in entity
This commit is contained in:
parent
9f8990adae
commit
284a55a5ae
1 changed files with 4 additions and 1 deletions
|
|
@ -17,7 +17,7 @@
|
|||
(clrhash stoe/core/entity::*component-dependencies*))
|
||||
|
||||
(eval-when (:compile-toplevel)
|
||||
(plan 18)
|
||||
(plan 21)
|
||||
(diag "Define components"))
|
||||
|
||||
(defcomponent comp-base1 ()
|
||||
|
|
@ -101,6 +101,9 @@
|
|||
(is (length (all-components ent3)) 2 "all-components 3")
|
||||
(is (length (components ent3 'comp-derived1)) 1 "get-component comp-derived1")
|
||||
(is (length (components ent3 'comp-derived2)) 1 "get-component comp-derived2")
|
||||
(is (length (components ent3 'comp-base1)) 1 "get-components comp-base1")
|
||||
(is (length (components ent3 'comp-base2)) 1 "get-components comp-base2")
|
||||
(is (length (components ent3 'comp-base1 nil)) 0 "get-components comp-base1 non-recursive")
|
||||
|
||||
(defparameter ent4 (create-entity "ent4"
|
||||
comp1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue