mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Store vector metatable in registry
This commit is contained in:
parent
11aab4198b
commit
06d197cdd0
10 changed files with 36 additions and 21 deletions
|
@ -36,3 +36,15 @@ local function test_dynamic_media(cb, player)
|
|||
-- if the callback isn't called this test will just hang :shrug:
|
||||
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 = minetest.get_node(pos)
|
||||
local found_pos = minetest.find_node_near(pos, 0, node.name, true)
|
||||
assert(vector.check(found_pos))
|
||||
end
|
||||
unittests.register("test_v3s16_metatable", test_v3s16_metatable, {map=true})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue