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 f38a60a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ static bool icon_size_clamp(int *w, int *h, int min_size, int max_size) {
*
* @param pixbuf (nullable) The pixbuf, which may be too big.
* Takes ownership of the reference.
* @param dpi_scale A double for the dpi scaling.
* @param min_size The minimum allowed icon size.
* @param max_size The maximum allowed icon size.
* @return the scaled version of the pixbuf. If scaling wasn't
Expand Down
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 f38a60a

Please sign in to comment.