Module:Sandbox/SD0001/Calculator/testcases
Appearance
![]() | This is the test cases page for the module Module:Sandbox/SD0001/Calculator. Results of the test cases. |
local Calculator = require('Module:Sandbox/SD0001/Calculator')
return {
main = function (frame)
local calc = Calculator:new()
calc:codexLabel {
description = 'Short description text',
label = 'Label text',
['for'] = 'foo'
}
calc:codexText {
default = 42,
id = 'foo'
}
-- {{Calculator codex radio|id=myradio|name=group1|label=First option|description=Additional text describing the first option}}
calc:codexRadio {
id = 'myradio',
name = 'group1',
label = 'First option',
description = 'Additional text describing the first option'
}
-- {{Calculator label|codex=true|description=Short description text|label=Label text|for=foo}}
-- {{calculator codex text|default=42|id=foo}}
calc:codexCheckbox {
id = 'mycheck',
name = 'group1',
label = 'First option',
description = 'Additional text describing the first option'
}
-- {{Calculator codex toggle|id=mycheck|label=My toggle|description=Additional text describing the toggle}}
calc:codexToggle {
id = 'mycheck',
label = 'My toggle',
description = 'Additional text describing the toggle'
}
return tostring(calc)
end
}