From df5ecd4c6fb3a2e9da282d96bbcd1beba5029cd1 Mon Sep 17 00:00:00 2001 From: The Personal Things Date: Sun, 8 May 2016 21:00:59 +0400 Subject: [PATCH] tests: test-resize: use math.ceil to handle uneven screen width (#882) See https://github.com/awesomeWM/awesome/issues/848#issuecomment-217361136. This is actually a leftover from 612756f and is meant to fix the failure at https://github.com/awesomeWM/awesome/pull/870. --- 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 18613b1e..d7c8085e 100644 --- a/tests/test-resize.lua +++ b/tests/test-resize.lua @@ -239,7 +239,7 @@ end) table.insert(steps, function() local c = client.get()[1] - assert(c:geometry().x == c.screen.workarea.x+c.screen.workarea.width/2 ) + assert(c:geometry().x == math.ceil(c.screen.workarea.x+c.screen.workarea.width/2)) assert(c:geometry().y == c.screen.workarea.y ) 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)) @@ -257,7 +257,7 @@ end) table.insert(steps, function() local c = client.get()[1] - assert(c:geometry().x == c.screen.workarea.x+c.screen.workarea.width/2 ) + assert(c:geometry().x == math.ceil(c.screen.workarea.x+c.screen.workarea.width/2)) assert(c:geometry().y == c.screen.workarea.y ) assert(c:geometry().width == math.ceil(c.screen.workarea.width/2 - 2*c.border_width)) assert(c:geometry().height == c.screen.workarea.height - 2*c.border_width )