Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bynect committed Apr 16, 2024
1 parent a564eb4 commit b155ad7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions test/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const struct output dummy_output = {

wl_display_surface,
wl_win_get_context,
wl_win_get_surface,

noop_screen,

Expand All @@ -48,6 +49,7 @@ const struct output dummy_output = {

x_display_surface,
x_win_get_context,
x_win_get_surface,

noop_screen,

Expand Down
16 changes: 8 additions & 8 deletions test/notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ TEST test_notification_icon_scaling_toosmall(void)
struct notification *n = notification_load_icon_with_scaling(20, 100);

ASSERT(n->icon);
ASSERT_EQ(get_icon_width(n->icon, 1), 20);
ASSERT_EQ(get_icon_height(n->icon, 1), 20);
ASSERT_EQ(get_icon_width(n->icon), 20);
ASSERT_EQ(get_icon_height(n->icon), 20);

notification_unref(n);

Expand All @@ -182,8 +182,8 @@ TEST test_notification_icon_scaling_toolarge(void)
struct notification *n = notification_load_icon_with_scaling(5, 10);

ASSERT(n->icon);
ASSERT_EQ(get_icon_width(n->icon, 1), 10);
ASSERT_EQ(get_icon_height(n->icon, 1), 10);
ASSERT_EQ(get_icon_width(n->icon), 10);
ASSERT_EQ(get_icon_height(n->icon), 10);

notification_unref(n);

Expand All @@ -195,8 +195,8 @@ TEST test_notification_icon_scaling_notconfigured(void)
struct notification *n = notification_load_icon_with_scaling(0, 0);

ASSERT(n->icon);
ASSERT_EQ(get_icon_width(n->icon, 1), 16);
ASSERT_EQ(get_icon_height(n->icon, 1), 16);
ASSERT_EQ(get_icon_width(n->icon), 16);
ASSERT_EQ(get_icon_height(n->icon), 16);

notification_unref(n);

Expand All @@ -208,8 +208,8 @@ TEST test_notification_icon_scaling_notneeded(void)
struct notification *n = notification_load_icon_with_scaling(10, 20);

ASSERT(n->icon);
ASSERT_EQ(get_icon_width(n->icon, 1), 16);
ASSERT_EQ(get_icon_height(n->icon, 1), 16);
ASSERT_EQ(get_icon_width(n->icon), 16);
ASSERT_EQ(get_icon_height(n->icon), 16);

notification_unref(n);

Expand Down

0 comments on commit b155ad7

Please sign in to comment.