mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 09:30:03 +00:00
Update unit tests
This commit is contained in:
parent
4a1e5167d5
commit
5694b4c034
1 changed files with 4 additions and 3 deletions
|
@ -488,7 +488,7 @@ TEST("world", function()
|
||||||
CHECK(count == 0)
|
CHECK(count == 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
do CASE "should use the same functions for empty iteration where applicable"
|
do CASE "should return nothing for empty iteration"
|
||||||
local world = jecs.World.new()
|
local world = jecs.World.new()
|
||||||
local A = world:component()
|
local A = world:component()
|
||||||
local B = world:component()
|
local B = world:component()
|
||||||
|
@ -497,8 +497,9 @@ TEST("world", function()
|
||||||
world:add(e1, A)
|
world:add(e1, A)
|
||||||
|
|
||||||
local query = world:query(B)
|
local query = world:query(B)
|
||||||
CHECK(query.__iter == query.next)
|
CHECK(query.__iter() == nil)
|
||||||
CHECK(query.next == query.replace)
|
CHECK(query.next() == nil)
|
||||||
|
CHECK(query.replace() == nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
do CASE "should properly handle query:without for empty iteration"
|
do CASE "should properly handle query:without for empty iteration"
|
||||||
|
|
Loading…
Reference in a new issue