Skip to content

Commit f23ca06

Browse files
committed
Add strut checks
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
1 parent 384822e commit f23ca06

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tests/test-x11-struts.cc

+10-8
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,22 @@ TEST_CASE("x11 set_struts sets correct struts") {
9292
REQUIRE(full.type() == mock::CARDINAL);
9393

9494
auto strut_bounds = expect_strut(full);
95-
// CHECK(strut_bounds.left == 0);
96-
// CHECK(strut_bounds.right == workarea.width() - window.geometry.width());
97-
// CHECK(strut_bounds.top == 0);
98-
// CHECK(strut_bounds.bottom == workarea.height() - window.geometry.height());
95+
CHECK(strut_bounds.left == 0);
96+
CHECK(strut_bounds.right == workarea.width() - window.geometry.width());
97+
CHECK(strut_bounds.top == 0);
98+
CHECK(strut_bounds.bottom == workarea.height() - window.geometry.height());
9999

100100
mock::x11_change_property partial =
101101
EXPECT_NEXT_CHANGE(mock::x11_change_property);
102102
REQUIRE(partial.property_name() == "_NET_WM_STRUT_PARTIAL");
103103
REQUIRE(partial.type_name() == "CARDINAL");
104104
auto strut_partial_bounds = expect_strut_partial(partial);
105-
// CHECK(strut_partial_bounds.left == 0);
106-
// CHECK(strut_partial_bounds.right == workarea.width() - window.geometry.width());
107-
// CHECK(strut_partial_bounds.top == 0);
108-
// CHECK(strut_partial_bounds.bottom == workarea.height() - window.geometry.height());
105+
CHECK(strut_partial_bounds.left == 0);
106+
CHECK(strut_partial_bounds.right ==
107+
workarea.width() - window.geometry.width());
108+
CHECK(strut_partial_bounds.top == 0);
109+
CHECK(strut_partial_bounds.bottom ==
110+
workarea.height() - window.geometry.height());
109111
}
110112

111113
// Reset globals

0 commit comments

Comments
 (0)