Module:Ability stat/testcases

local myModule = require("Module:Ability stat/sandbox") local ScribuntoUnit = require("Module:ScribuntoUnit") local suite = ScribuntoUnit:new

local get_levels = myModule.get_levels

function suite:testFastWarriorLevels self:assertDeepEquals(get_levels{rarity="1+", jobtype="warrior"}, {2}) self:assertDeepEquals(get_levels{rarity="2+", jobtype="warrior"}, {4}) self:assertDeepEquals(get_levels{rarity="3+", jobtype="warrior"}, {6}) self:assertDeepEquals(get_levels{rarity="4+", jobtype="warrior"}, {8}) self:assertDeepEquals(get_levels{rarity="5+", jobtype="warrior"}, {10}) self:assertDeepEquals(get_levels{rarity="1,1+", jobtype="warrior"}, {2}) self:assertDeepEquals(get_levels{rarity="1,2+", jobtype="warrior"}, {2,4}) self:assertDeepEquals(get_levels{rarity="1,3+", jobtype="warrior"}, {2,4,6}) self:assertDeepEquals(get_levels{rarity="1,4+", jobtype="warrior"}, {2,4,6,8}) self:assertDeepEquals(get_levels{rarity="1,5+", jobtype="warrior"}, {2,4,6,8,10}) self:assertDeepEquals(get_levels{rarity="2,1+", jobtype="warrior"}, {2,4}) self:assertDeepEquals(get_levels{rarity="2,2+", jobtype="warrior"}, { 4}) self:assertDeepEquals(get_levels{rarity="2,3+", jobtype="warrior"}, { 4,6}) self:assertDeepEquals(get_levels{rarity="2,4+", jobtype="warrior"}, { 4,6,8}) self:assertDeepEquals(get_levels{rarity="2,5+", jobtype="warrior"}, { 4,6,8,10}) self:assertDeepEquals(get_levels{rarity="3,1+", jobtype="warrior"}, {2,4,6}) self:assertDeepEquals(get_levels{rarity="3,2+", jobtype="warrior"}, { 4,6}) self:assertDeepEquals(get_levels{rarity="3,3+", jobtype="warrior"}, {   6}) self:assertDeepEquals(get_levels{rarity="3,4+", jobtype="warrior"}, {   6,8}) self:assertDeepEquals(get_levels{rarity="3,5+", jobtype="warrior"}, {   6,8,10}) self:assertDeepEquals(get_levels{rarity="4,1+", jobtype="warrior"}, {2,4,6,8}) self:assertDeepEquals(get_levels{rarity="4,2+", jobtype="warrior"}, { 4,6,8}) self:assertDeepEquals(get_levels{rarity="4,3+", jobtype="warrior"}, {   6,8}) self:assertDeepEquals(get_levels{rarity="4,4+", jobtype="warrior"}, {     8}) self:assertDeepEquals(get_levels{rarity="4,5+", jobtype="warrior"}, {     8,10}) self:assertDeepEquals(get_levels{rarity="5,1+", jobtype="warrior"}, {2,4,6,8,10}) self:assertDeepEquals(get_levels{rarity="5,2+", jobtype="warrior"}, { 4,6,8,10}) self:assertDeepEquals(get_levels{rarity="5,3+", jobtype="warrior"}, {   6,8,10}) self:assertDeepEquals(get_levels{rarity="5,4+", jobtype="warrior"}, {     8,10}) self:assertDeepEquals(get_levels{rarity="5,5+", jobtype="warrior"}, {       10}) end function suite:testNormalWarriorLevels self:assertDeepEquals(get_levels{rarity="1", jobtype="warrior"}, {1,2}) self:assertDeepEquals(get_levels{rarity="2", jobtype="warrior"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="3", jobtype="warrior"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="4", jobtype="warrior"}, {1,2,3,4,5,6,7,8}) self:assertDeepEquals(get_levels{rarity="5", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="1,1", jobtype="warrior"}, {1,2}) self:assertDeepEquals(get_levels{rarity="1,2", jobtype="warrior"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="1,3", jobtype="warrior"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="1,4", jobtype="warrior"}, {1,2,3,4,5,6,7,8}) self:assertDeepEquals(get_levels{rarity="1,5", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="2,1", jobtype="warrior"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="2,2", jobtype="warrior"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="2,3", jobtype="warrior"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="2,4", jobtype="warrior"}, {1,2,3,4,5,6,7,8}) self:assertDeepEquals(get_levels{rarity="2,5", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="3,1", jobtype="warrior"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="3,2", jobtype="warrior"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="3,3", jobtype="warrior"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="3,4", jobtype="warrior"}, {1,2,3,4,5,6,7,8}) self:assertDeepEquals(get_levels{rarity="3,5", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="4,1", jobtype="warrior"}, {1,2,3,4,5,6,7,8}) self:assertDeepEquals(get_levels{rarity="4,2", jobtype="warrior"}, {1,2,3,4,5,6,7,8}) self:assertDeepEquals(get_levels{rarity="4,3", jobtype="warrior"}, {1,2,3,4,5,6,7,8}) self:assertDeepEquals(get_levels{rarity="4,4", jobtype="warrior"}, {1,2,3,4,5,6,7,8}) self:assertDeepEquals(get_levels{rarity="4,5", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="5,1", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="5,2", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="5,3", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="5,4", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) self:assertDeepEquals(get_levels{rarity="5,5", jobtype="warrior"}, {1,2,3,4,5,6,7,8,9,10}) end function suite:testFastSupportLevels self:assertDeepEquals(get_levels{rarity="1+", jobtype="support"}, {2}) self:assertDeepEquals(get_levels{rarity="2+", jobtype="support"}, {3}) self:assertDeepEquals(get_levels{rarity="3+", jobtype="support"}, {4}) self:assertDeepEquals(get_levels{rarity="4+", jobtype="support"}, {5}) self:assertDeepEquals(get_levels{rarity="5+", jobtype="support"}, {6}) self:assertDeepEquals(get_levels{rarity="1,1+", jobtype="support"}, {2}) self:assertDeepEquals(get_levels{rarity="1,2+", jobtype="support"}, {2,3}) self:assertDeepEquals(get_levels{rarity="1,3+", jobtype="support"}, {2,3,4}) self:assertDeepEquals(get_levels{rarity="1,4+", jobtype="support"}, {2,3,4,5}) self:assertDeepEquals(get_levels{rarity="1,5+", jobtype="support"}, {2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="2,1+", jobtype="support"}, {2,3}) self:assertDeepEquals(get_levels{rarity="2,2+", jobtype="support"}, {3}) self:assertDeepEquals(get_levels{rarity="2,3+", jobtype="support"}, {3,4}) self:assertDeepEquals(get_levels{rarity="2,4+", jobtype="support"}, {3,4,5}) self:assertDeepEquals(get_levels{rarity="2,5+", jobtype="support"}, {3,4,5,6}) self:assertDeepEquals(get_levels{rarity="3,1+", jobtype="support"}, {2,3,4}) self:assertDeepEquals(get_levels{rarity="3,2+", jobtype="support"}, {3,4}) self:assertDeepEquals(get_levels{rarity="3,3+", jobtype="support"}, {4}) self:assertDeepEquals(get_levels{rarity="3,4+", jobtype="support"}, {4,5}) self:assertDeepEquals(get_levels{rarity="3,5+", jobtype="support"}, {4,5,6}) self:assertDeepEquals(get_levels{rarity="4,1+", jobtype="support"}, {2,3,4,5}) self:assertDeepEquals(get_levels{rarity="4,2+", jobtype="support"}, {3,4,5}) self:assertDeepEquals(get_levels{rarity="4,3+", jobtype="support"}, {4,5}) self:assertDeepEquals(get_levels{rarity="4,4+", jobtype="support"}, {5}) self:assertDeepEquals(get_levels{rarity="4,5+", jobtype="support"}, {5,6}) self:assertDeepEquals(get_levels{rarity="5,1+", jobtype="support"}, {2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="5,2+", jobtype="support"}, {3,4,5,6}) self:assertDeepEquals(get_levels{rarity="5,3+", jobtype="support"}, {4,5,6}) self:assertDeepEquals(get_levels{rarity="5,4+", jobtype="support"}, {5,6}) self:assertDeepEquals(get_levels{rarity="5,5+", jobtype="support"}, {6}) end function suite:testNormalSupportLevels self:assertDeepEquals(get_levels{rarity="1", jobtype="support"}, {1,2}) self:assertDeepEquals(get_levels{rarity="2", jobtype="support"}, {1,2,3}) self:assertDeepEquals(get_levels{rarity="3", jobtype="support"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="4", jobtype="support"}, {1,2,3,4,5}) self:assertDeepEquals(get_levels{rarity="5", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="1,1", jobtype="support"}, {1,2}) self:assertDeepEquals(get_levels{rarity="1,2", jobtype="support"}, {1,2,3}) self:assertDeepEquals(get_levels{rarity="1,3", jobtype="support"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="1,4", jobtype="support"}, {1,2,3,4,5}) self:assertDeepEquals(get_levels{rarity="1,5", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="2,1", jobtype="support"}, {1,2,3}) self:assertDeepEquals(get_levels{rarity="2,2", jobtype="support"}, {1,2,3}) self:assertDeepEquals(get_levels{rarity="2,3", jobtype="support"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="2,4", jobtype="support"}, {1,2,3,4,5}) self:assertDeepEquals(get_levels{rarity="2,5", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="3,1", jobtype="support"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="3,2", jobtype="support"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="3,3", jobtype="support"}, {1,2,3,4}) self:assertDeepEquals(get_levels{rarity="3,4", jobtype="support"}, {1,2,3,4,5}) self:assertDeepEquals(get_levels{rarity="3,5", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="4,1", jobtype="support"}, {1,2,3,4,5}) self:assertDeepEquals(get_levels{rarity="4,2", jobtype="support"}, {1,2,3,4,5}) self:assertDeepEquals(get_levels{rarity="4,3", jobtype="support"}, {1,2,3,4,5}) self:assertDeepEquals(get_levels{rarity="4,4", jobtype="support"}, {1,2,3,4,5}) self:assertDeepEquals(get_levels{rarity="4,5", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="5,1", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="5,2", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="5,3", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="5,4", jobtype="support"}, {1,2,3,4,5,6}) self:assertDeepEquals(get_levels{rarity="5,5", jobtype="support"}, {1,2,3,4,5,6}) end

return suite