server/scripts/tests/bindings.lua
Enno Rehling 9124fe2c6d added promote, renumber, restack to eressea.process interface
fixed a test that relied on no random skill progress
2012-06-16 23:31:25 -07:00

44 lines
1.8 KiB
Lua
Executable file

require "lunit"
local eressea = eressea
local _G = _G
module("tests.bindings", lunit.testcase)
function test_eressea()
assert_equal("function", _G.type(eressea.free_game))
assert_equal("function", _G.type(eressea.read_game))
assert_equal("function", _G.type(eressea.write_game))
assert_equal("function", _G.type(eressea.read_orders))
end
function test_process()
assert_equal("function", _G.type(eressea.process.update_long_order))
assert_equal("function", _G.type(eressea.process.markets))
assert_equal("function", _G.type(eressea.process.produce))
assert_equal("function", _G.type(eressea.process.make_temp))
assert_equal("function", _G.type(eressea.process.settings))
assert_equal("function", _G.type(eressea.process.set_allies))
assert_equal("function", _G.type(eressea.process.set_prefix))
assert_equal("function", _G.type(eressea.process.set_stealth))
assert_equal("function", _G.type(eressea.process.set_status))
assert_equal("function", _G.type(eressea.process.set_name))
assert_equal("function", _G.type(eressea.process.set_group))
assert_equal("function", _G.type(eressea.process.set_origin))
assert_equal("function", _G.type(eressea.process.quit))
assert_equal("function", _G.type(eressea.process.study))
assert_equal("function", _G.type(eressea.process.movement))
assert_equal("function", _G.type(eressea.process.use))
assert_equal("function", _G.type(eressea.process.battle))
assert_equal("function", _G.type(eressea.process.siege))
assert_equal("function", _G.type(eressea.process.leave))
assert_equal("function", _G.type(eressea.process.promote))
assert_equal("function", _G.type(eressea.process.renumber))
assert_equal("function", _G.type(eressea.process.restack))
end
function test_settings()
assert_equal("function", _G.type(eressea.settings.set))
assert_equal("function", _G.type(eressea.settings.get))
end