You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
539 B
28 lines
539 B
#!/usr/bin/env lua5.1
|
|
require('luaunit')
|
|
require 'mocks.sr'
|
|
|
|
TestMock = {}
|
|
function TestMock:testMock()
|
|
m = mc:mock()
|
|
m.pv = mc:mock()
|
|
m.titi( 42 )
|
|
m.toto( 33, "abc", { 21} )
|
|
end
|
|
|
|
TestSRMock = {}
|
|
function TestSRMock:setUp()
|
|
self.sr = srMock:new()
|
|
end
|
|
|
|
function TestSRMock:test_ini()
|
|
assertTrue(self.sr.pv)
|
|
self.sr.pv.sets("$avp('hithere')", "value")
|
|
end
|
|
|
|
---- Control test output:
|
|
lu = LuaUnit
|
|
lu:setOutputType( "TAP" )
|
|
lu:setVerbosity( 1 )
|
|
lu:run()
|
|
--EOF |