diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-03-29 12:07:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 18:07:00 +0200 |
commit | 06d197cdd042392e1551e5e7244c61300a6bb4e3 (patch) | |
tree | c47a0c58917f5f89af1c5128e42611d0d8a3d320 /games/devtest/mods | |
parent | 11aab4198be1a0f1104a433896e908e4c86de0c9 (diff) | |
download | minetest-06d197cdd042392e1551e5e7244c61300a6bb4e3.tar.gz minetest-06d197cdd042392e1551e5e7244c61300a6bb4e3.tar.bz2 minetest-06d197cdd042392e1551e5e7244c61300a6bb4e3.zip |
Store vector metatable in registry
Diffstat (limited to 'games/devtest/mods')
-rw-r--r-- | games/devtest/mods/unittests/misc.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/games/devtest/mods/unittests/misc.lua b/games/devtest/mods/unittests/misc.lua index cf4f92cfa..ba980866a 100644 --- a/games/devtest/mods/unittests/misc.lua +++ b/games/devtest/mods/unittests/misc.lua @@ -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}) |