mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add unit tests for Lua vector reading
This commit is contained in:
parent
a5263dc7ed
commit
ec16fb33d0
5 changed files with 197 additions and 20 deletions
|
@ -67,18 +67,6 @@ local function test_dynamic_media(cb, player)
|
|||
end
|
||||
unittests.register("test_dynamic_media", test_dynamic_media, {async=true, player=true})
|
||||
|
||||
local function test_v3f_metatable(player)
|
||||
assert(vector.check(player:get_pos()))
|
||||
end
|
||||
unittests.register("test_v3f_metatable", test_v3f_metatable, {player=true})
|
||||
|
||||
local function test_v3s16_metatable(player, pos)
|
||||
local node = core.get_node(pos)
|
||||
local found_pos = core.find_node_near(pos, 0, node.name, true)
|
||||
assert(vector.check(found_pos))
|
||||
end
|
||||
unittests.register("test_v3s16_metatable", test_v3s16_metatable, {map=true})
|
||||
|
||||
local function test_clear_meta(_, pos)
|
||||
local ref = core.get_meta(pos)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue