diff --git a/tests/test-maximize.lua b/tests/test-maximize.lua index 0e9f2eed..8d5aa711 100644 --- a/tests/test-maximize.lua +++ b/tests/test-maximize.lua @@ -5,6 +5,11 @@ local awful = require("awful") local test_client = require("_client") 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 steps = { @@ -68,9 +73,8 @@ local steps = { local new_geo = c:geometry() - for k,v in pairs(original_geo) do - assert(new_geo[k] == v) - end + assert(geo_to_str(original_geo) == geo_to_str(new_geo), + geo_to_str(original_geo) .. " == " .. geo_to_str(new_geo)) c.fullscreen = true @@ -99,9 +103,8 @@ local steps = { local new_geo = c:geometry() - for k,v in pairs(original_geo) do - assert(new_geo[k] == v) - end + assert(geo_to_str(original_geo) == geo_to_str(new_geo), + geo_to_str(original_geo) .. " == " .. geo_to_str(new_geo)) c.floating = true @@ -136,9 +139,8 @@ local steps = { local new_geo = c:geometry() - for k,v in pairs(original_geo) do - assert(new_geo[k] == v) - end + assert(geo_to_str(original_geo) == geo_to_str(new_geo), + geo_to_str(original_geo) .. " == " .. geo_to_str(new_geo)) return true end