mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 09:30:03 +00:00
Uncomment cases
This commit is contained in:
parent
ebb81749fb
commit
75749c2028
1 changed files with 1 additions and 5 deletions
|
@ -14,7 +14,6 @@ local TEST, CASE, CHECK, FINISH, SKIP = testkit.test()
|
||||||
local N = 10
|
local N = 10
|
||||||
|
|
||||||
TEST("world", function()
|
TEST("world", function()
|
||||||
--[[
|
|
||||||
do CASE "should be iterable"
|
do CASE "should be iterable"
|
||||||
local world = jecs.World.new()
|
local world = jecs.World.new()
|
||||||
local A = world:component()
|
local A = world:component()
|
||||||
|
@ -211,7 +210,6 @@ TEST("world", function()
|
||||||
CHECK(e == bob)
|
CHECK(e == bob)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
]]
|
|
||||||
|
|
||||||
do CASE "should allow wildcards in queries"
|
do CASE "should allow wildcards in queries"
|
||||||
local world = jecs.World.new()
|
local world = jecs.World.new()
|
||||||
|
@ -219,17 +217,15 @@ TEST("world", function()
|
||||||
local Apples = world:entity()
|
local Apples = world:entity()
|
||||||
local bob = world:entity()
|
local bob = world:entity()
|
||||||
|
|
||||||
world:set(bob, ECS_PAIR(Eats, Apples), true)
|
world:add(bob, ECS_PAIR(Eats, Apples))
|
||||||
--testkit.print(world.componentIndex)
|
--testkit.print(world.componentIndex)
|
||||||
|
|
||||||
local w = jecs.Wildcard
|
local w = jecs.Wildcard
|
||||||
for e, bool in world:query(ECS_PAIR(Eats, w)) do
|
for e, bool in world:query(ECS_PAIR(Eats, w)) do
|
||||||
CHECK(e == bob)
|
CHECK(e == bob)
|
||||||
CHECK(bool)
|
|
||||||
end
|
end
|
||||||
for e, bool in world:query(ECS_PAIR(w, Apples)) do
|
for e, bool in world:query(ECS_PAIR(w, Apples)) do
|
||||||
CHECK(e == bob)
|
CHECK(e == bob)
|
||||||
CHECK(bool)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue