2016-04-21 06:16:40 +00:00
|
|
|
describe("ProgressWidget widget", function()
|
|
|
|
local ProgressWidget, Screen
|
|
|
|
setup(function()
|
|
|
|
require("commonrequire")
|
|
|
|
ProgressWidget = require("ui/widget/progresswidget")
|
|
|
|
Screen = require("device").screen
|
|
|
|
end)
|
|
|
|
|
2016-04-28 07:02:15 +00:00
|
|
|
it("should not crash with nil self.last", function()
|
2016-04-21 06:16:40 +00:00
|
|
|
local progress = ProgressWidget:new{
|
2017-09-11 08:32:39 +00:00
|
|
|
width = Screen:scaleBySize(100),
|
|
|
|
height = Screen:scaleBySize(50),
|
2016-04-21 06:16:40 +00:00
|
|
|
percentage = 5/100,
|
|
|
|
ticks = {1},
|
|
|
|
}
|
|
|
|
progress:paintTo(Screen.bb, 0, 0)
|
|
|
|
end)
|
|
|
|
end)
|