From 612756ff0ef4d219d6c6a831be02a084958285b5 Mon Sep 17 00:00:00 2001 From: Jajauma Date: Sun, 1 May 2016 16:05:20 -0400 Subject: [PATCH] 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. --- tests/test-resize.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-resize.lua b/tests/test-resize.lua index a9eb7168d..18613b1ea 100644 --- a/tests/test-resize.lua +++ b/tests/test-resize.lua @@ -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))