Update unit tests

This commit is contained in:
EncodedVenom 2024-07-08 08:58:58 -04:00 committed by GitHub
parent 4a1e5167d5
commit 5694b4c034
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"