mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 01:20:04 +00:00
Compare commits
1 commit
217402eb51
...
0a4d608b44
Author | SHA1 | Date | |
---|---|---|---|
|
0a4d608b44 |
1 changed files with 2 additions and 3 deletions
|
@ -1473,12 +1473,11 @@ TEST("Hooks", function()
|
||||||
local world = jecs.World.new()
|
local world = jecs.World.new()
|
||||||
local A = world:component() :: Entity<boolean>
|
local A = world:component() :: Entity<boolean>
|
||||||
local e1 = world:entity()
|
local e1 = world:entity()
|
||||||
|
world:add(e1, A)
|
||||||
world:set(A, jecs.OnRemove, function(entity)
|
world:set(A, jecs.OnRemove, function(entity)
|
||||||
CHECK(e1 == entity)
|
CHECK(e1 == entity)
|
||||||
CHECK(world:has(e1, A))
|
CHECK(not world:has(e1, A))
|
||||||
end)
|
end)
|
||||||
world:add(e1, A)
|
|
||||||
|
|
||||||
world:remove(e1, A)
|
world:remove(e1, A)
|
||||||
CHECK(not world:has(e1, A))
|
CHECK(not world:has(e1, A))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue