let CycleHotkeyLabels take numeric initial_options
even if all of the option values are non-numericdevelop
parent
47b87a5ac1
commit
53609db1f9
@ -0,0 +1,18 @@
|
|||||||
|
local widgets = require('gui.widgets')
|
||||||
|
|
||||||
|
function test.togglehotkeylabel()
|
||||||
|
local toggle = widgets.ToggleHotkeyLabel{}
|
||||||
|
expect.true_(toggle:getOptionValue())
|
||||||
|
toggle:cycle()
|
||||||
|
expect.false_(toggle:getOptionValue())
|
||||||
|
toggle:cycle()
|
||||||
|
expect.true_(toggle:getOptionValue())
|
||||||
|
end
|
||||||
|
|
||||||
|
function test.togglehotkeylabel_default_value()
|
||||||
|
local toggle = widgets.ToggleHotkeyLabel{initial_option=2}
|
||||||
|
expect.false_(toggle:getOptionValue())
|
||||||
|
|
||||||
|
toggle = widgets.ToggleHotkeyLabel{initial_option=false}
|
||||||
|
expect.false_(toggle:getOptionValue())
|
||||||
|
end
|
Loading…
Reference in New Issue