Sync to upstream Jecs (#8)

Reviewed-on: #8
This commit is contained in:
marked 2025-03-02 19:31:44 +01:00
parent bac9269a2c
commit ce9e513d23
11 changed files with 3002 additions and 0 deletions

114
jecs/test_fulllog.txt Normal file
View file

@ -0,0 +1,114 @@
8.3 us  3 kB│ delete children of entity
9.3 us  2 kB│ remove friends of entity
332 ns  0  B│ simple deletion of entity
removing
archetype
PASS│ 
world:cleanup()
PASS│ 
world:entity()
PASS│ unique IDs
PASS│ generations
PASS│ pairs
PASS│ Recycling
PASS│ Recycling max generation
world:set()
PASS│ archetype move
PASS│ pairs
world:remove()
PASS│ should allow remove a component that doesn't exist on entity
world:add()
PASS│ idempotent
PASS│ archetype move
world:query()
PASS│ cached
PASS│ multiple iter
PASS│ tag
PASS│ pairs
PASS│ query single component
PASS│ query missing component
PASS│ query more than 8 components
PASS│ should be able to get next results
PASS│ should query all matching entities when irrelevant component is removed
PASS│ should query all entities without B
PASS│ should allow querying for relations
PASS│ should allow wildcards in queries
PASS│ should match against multiple pairs
PASS│ should only relate alive entities
NONE│ should error when setting invalid pair
PASS│ should find target for ChildOf
PASS│ despawning while iterating
NONE│ iterator invalidation
SKIP│ adding
PASS│ spawning
PASS│ should not find any entities
PASS│ without
world:each
PASS│ 
world:children
PASS│ 
world:clear()
PASS│ should remove its components
PASS│ should move last record
world:has()
PASS│ should find Tag on entity
PASS│ should return false when missing one tag
world:component()
PASS│ only components should have EcsComponent trait
PASS│ tag
world:delete
PASS│ invoke OnRemove hooks
PASS│ delete recycled entity id used as component
PASS│ bug: Empty entity does not respect cleanup policy
PASS│ should allow deleting components
PASS│ delete entities using another Entity as component with Delete cleanup action
PASS│ delete children
PASS│ fast delete
PASS│ cycle
world:target
PASS│ nth index
PASS│ infer index when unspecified
PASS│ loop until no target
world:contains
PASS│ 
PASS│ should not exist after delete
Hooks
PASS│ OnAdd
PASS│ OnSet
PASS│ OnRemove
change tracking
PASS│ #1
PASS│ #2
repro
PASS│ #1
PASS│ #2
wildcard query
PASS│ #1
PASS│ #2
PASS│ #3
world:delete() invokes OnRemove hook
PASS│ #1
PASS│ #2
PASS│ #3
68/68 test cases passed in 31.778 ms.
0 fails