Skip to content

Commit

Permalink
Add strut checks
Browse files Browse the repository at this point in the history
Signed-off-by: Tin Švagelj <[email protected]>
  • Loading branch information
Caellian committed Dec 9, 2024
1 parent 384822e commit f23ca06
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/test-x11-struts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,22 @@ TEST_CASE("x11 set_struts sets correct struts") {
REQUIRE(full.type() == mock::CARDINAL);

auto strut_bounds = expect_strut(full);
// CHECK(strut_bounds.left == 0);
// CHECK(strut_bounds.right == workarea.width() - window.geometry.width());
// CHECK(strut_bounds.top == 0);
// CHECK(strut_bounds.bottom == workarea.height() - window.geometry.height());
CHECK(strut_bounds.left == 0);
CHECK(strut_bounds.right == workarea.width() - window.geometry.width());
CHECK(strut_bounds.top == 0);
CHECK(strut_bounds.bottom == workarea.height() - window.geometry.height());

mock::x11_change_property partial =
EXPECT_NEXT_CHANGE(mock::x11_change_property);
REQUIRE(partial.property_name() == "_NET_WM_STRUT_PARTIAL");
REQUIRE(partial.type_name() == "CARDINAL");
auto strut_partial_bounds = expect_strut_partial(partial);
// CHECK(strut_partial_bounds.left == 0);
// CHECK(strut_partial_bounds.right == workarea.width() - window.geometry.width());
// CHECK(strut_partial_bounds.top == 0);
// CHECK(strut_partial_bounds.bottom == workarea.height() - window.geometry.height());
CHECK(strut_partial_bounds.left == 0);
CHECK(strut_partial_bounds.right ==
workarea.width() - window.geometry.width());
CHECK(strut_partial_bounds.top == 0);
CHECK(strut_partial_bounds.bottom ==
workarea.height() - window.geometry.height());
}

// Reset globals
Expand Down

0 comments on commit f23ca06

Please sign in to comment.