tests: test-resize: use math.ceil to handle uneven screen height

See https://github.com/awesomeWM/awesome/issues/848#issuecomment-216052517.
Closes https://github.com/awesomeWM/awesome/pull/869.
This commit is contained in:
Jajauma 2016-05-01 16:05:20 -04:00 committed by Daniel Hahler
parent 95f1b1ad56
commit 612756ff0e
1 changed files with 2 additions and 2 deletions

View File

@ -276,7 +276,7 @@ table.insert(steps, function()
local c = client.get()[1]
assert(c:geometry().x == c.screen.workarea.x )
assert(c:geometry().y == c.screen.workarea.y+c.screen.workarea.height/2 )
assert(c:geometry().y == math.ceil(c.screen.workarea.y+c.screen.workarea.height/2))
assert(c:geometry().width == c.screen.workarea.width - 2*c.border_width )
assert(c:geometry().height == math.ceil(c.screen.workarea.height/2 - 2*c.border_width))
@ -294,7 +294,7 @@ table.insert(steps, function()
local c = client.get()[1]
assert(c:geometry().x == c.screen.workarea.x )
assert(c:geometry().y == c.screen.workarea.y+c.screen.workarea.height/2 )
assert(c:geometry().y == math.ceil(c.screen.workarea.y+c.screen.workarea.height/2))
assert(c:geometry().width == math.ceil(c.screen.workarea.width/2 - 2*c.border_width) )
assert(c:geometry().height == math.ceil(c.screen.workarea.height/2 - 2*c.border_width))