REF clean up some childish stuff

This commit is contained in:
Nathan Dwarshuis 2023-09-30 00:42:31 -04:00
parent d82ad44f58
commit 96734cd328
1 changed files with 8 additions and 4 deletions

View File

@ -127,6 +127,10 @@ M.assert_valid_pattern = function(what, pat)
end end
end end
M.validate_plot_ticks_y = function(what, x)
M.assert_greater_than(what..'.plot.ticks_y', x, 2)
end
-- TODO make spacing parameters aware of thickness, right now they start at the -- TODO make spacing parameters aware of thickness, right now they start at the
-- centry of lines, circles, etc. -- centry of lines, circles, etc.
@ -138,15 +142,15 @@ end
local validate_graphics = function(x) local validate_graphics = function(x)
M.assert_file_readable('graphics.dev_power', x.dev_power) M.assert_file_readable('graphics.dev_power', x.dev_power)
M.assert_greater_than('graphics.genometry.plot.ticks_y', x.geometry.plot.ticks_y, 2) M.validate_plot_ticks_y('graphics.geometry', x.geometry.plot.ticks_y)
end end
local validate_memory = function(x) local validate_memory = function(x)
M.assert_greater_than('memory.genometry.plot.ticks_y', x.geometry.plot.ticks_y, 2) M.validate_plot_ticks_y('memory.geometry', x.geometry.plot.ticks_y)
end end
local validate_network = function(x) local validate_network = function(x)
M.assert_greater_than('network.genometry.plot.ticks_y', x.geometry.plot.ticks_y, 2) M.validate_plot_ticks_y('network.geometry', x.geometry.plot.ticks_y)
end end
local validate_pacman = function(_) local validate_pacman = function(_)
@ -171,7 +175,7 @@ local validate_processor = function(x)
end end
local validate_readwrite = function(x) local validate_readwrite = function(x)
M.assert_greater_than('readwrite.genometry.plot.ticks_y', x.geometry.plot.ticks_y, 2) M.validate_plot_ticks_y('readwrite.geometry', x.geometry.plot.ticks_y)
end end
local validate_system = function(_) local validate_system = function(_)