test-maximize: Improve error messages

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-05-14 10:10:03 +02:00
parent e7232c0dc2
commit 2eef92a891
1 changed files with 11 additions and 9 deletions

View File

@ -5,6 +5,11 @@ local awful = require("awful")
local test_client = require("_client") local test_client = require("_client")
local lgi = require("lgi") local lgi = require("lgi")
local function geo_to_str(g)
return "pos=" .. g.x .. "," .. g.y ..
";size=" .. g.width .. "x" .. g.height
end
local original_geo = nil local original_geo = nil
local steps = { local steps = {
@ -68,9 +73,8 @@ local steps = {
local new_geo = c:geometry() local new_geo = c:geometry()
for k,v in pairs(original_geo) do assert(geo_to_str(original_geo) == geo_to_str(new_geo),
assert(new_geo[k] == v) geo_to_str(original_geo) .. " == " .. geo_to_str(new_geo))
end
c.fullscreen = true c.fullscreen = true
@ -99,9 +103,8 @@ local steps = {
local new_geo = c:geometry() local new_geo = c:geometry()
for k,v in pairs(original_geo) do assert(geo_to_str(original_geo) == geo_to_str(new_geo),
assert(new_geo[k] == v) geo_to_str(original_geo) .. " == " .. geo_to_str(new_geo))
end
c.floating = true c.floating = true
@ -136,9 +139,8 @@ local steps = {
local new_geo = c:geometry() local new_geo = c:geometry()
for k,v in pairs(original_geo) do assert(geo_to_str(original_geo) == geo_to_str(new_geo),
assert(new_geo[k] == v) geo_to_str(original_geo) .. " == " .. geo_to_str(new_geo))
end
return true return true
end end