Jump to content

Module:IP/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 05:17, 12 July 2016 (start test module). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-- Unit tests for [[Module:IP]]. Click talk page to run tests.

-- Unit test module setup
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()

-- Target module setup
local IP = require('Module:IP')
local IPAddress = IP.IPAddress
local IPRange = IP.IPRange

function suite:testGetIP()
	local obj = IPAddress.new('1.2.3.4')
	self:assertEquals('1.2.3.4', obj:getIP())
end

return suite