SX d6802c2a48 Update tests for network code refactoring
Drop coverage stats for sources outside of technic directory (technic_cnc, technic_worldgen)
Update technic API functions for tests (were exported just for tests, now part of API)

Move CNC tests, use shared fixtures for tests
2021-11-30 07:29:05 +02:00

38 lines
788 B
Lua

-- Simple digilines mod fixture that logs sent messages, works with some simple digiline mods
mineunit:set_modpath("digilines", "spec/fixtures")
digilines = {
_msg_log = {},
receptor_send = function(pos, rules, channel, msg)
table.insert(digilines._msg_log, {
pos = pos,
rules = rules,
channel = channel,
msg = msg,
})
end,
rules = {
default = {
{x=0, y=0, z=-1},
{x=1, y=0, z=0},
{x=-1, y=0, z=0},
{x=0, y=0, z=1},
{x=1, y=1, z=0},
{x=1, y=-1, z=0},
{x=-1, y=1, z=0},
{x=-1, y=-1, z=0},
{x=0, y=1, z=1},
{x=0, y=-1, z=1},
{x=0, y=1, z=-1},
{x=0, y=-1, z=-1}
}
}
}
digilines = setmetatable(digilines, {
__call = function(self,...) return self end,
__index = function(...) return function(...)end end,
})