From b4f08eb7b6f3b79e1c7f74a3275fcbfbe73c60d4 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 15 May 2016 03:31:17 -0400 Subject: [PATCH] tests: Add asserts to under_mouse --- tests/examples/awful/placement/under_mouse.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/examples/awful/placement/under_mouse.lua b/tests/examples/awful/placement/under_mouse.lua index e1b407659..adcb2b805 100644 --- a/tests/examples/awful/placement/under_mouse.lua +++ b/tests/examples/awful/placement/under_mouse.lua @@ -6,3 +6,6 @@ mouse.coords {x= 50, y=50} --DOC_HIDE mouse.push_history() --DOC_HIDE awful.placement.under_mouse(client.focus) + +assert(client.focus.x + client.focus.width /2 - mouse.coords().x <= 1) --DOC_HIDE +assert(client.focus.y + client.focus.height/2 - mouse.coords().y <= 1) --DOC_HIDE