summaryrefslogtreecommitdiffstats
path: root/src/test/test-format-util.c
diff options
context:
space:
mode:
authorIvan Kruglov <mail@ikruglov.com>2024-04-10 13:19:39 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-04-15 08:13:50 +0200
commitc79e88b37d3f8b94cdd2aeba1edbe09d06c08f7a (patch)
tree88c426bab7e104bc11ff4289e878bb676c083a9a /src/test/test-format-util.c
parentMerge pull request #32266 from yuwata/libsystemd-network-trivial-cleanups (diff)
downloadsystemd-c79e88b37d3f8b94cdd2aeba1edbe09d06c08f7a.tar.xz
systemd-c79e88b37d3f8b94cdd2aeba1edbe09d06c08f7a.zip
ASSERT_STREQ for simple cases
Diffstat (limited to 'src/test/test-format-util.c')
-rw-r--r--src/test/test-format-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test-format-util.c b/src/test/test-format-util.c
index 306350937a..94feb6cafc 100644
--- a/src/test/test-format-util.c
+++ b/src/test/test-format-util.c
@@ -34,10 +34,10 @@ static void test_format_bytes_one(uint64_t val, bool trailing_B, const char *iec
const char *si_with_p, const char *si_without_p) {
char buf[FORMAT_BYTES_MAX];
- assert_se(streq_ptr(format_bytes_full(buf, sizeof buf, val, FORMAT_BYTES_USE_IEC | FORMAT_BYTES_BELOW_POINT | (trailing_B ? FORMAT_BYTES_TRAILING_B : 0)), iec_with_p));
- assert_se(streq_ptr(format_bytes_full(buf, sizeof buf, val, FORMAT_BYTES_USE_IEC | (trailing_B ? FORMAT_BYTES_TRAILING_B : 0)), iec_without_p));
- assert_se(streq_ptr(format_bytes_full(buf, sizeof buf, val, FORMAT_BYTES_BELOW_POINT | (trailing_B ? FORMAT_BYTES_TRAILING_B : 0)), si_with_p));
- assert_se(streq_ptr(format_bytes_full(buf, sizeof buf, val, trailing_B ? FORMAT_BYTES_TRAILING_B : 0), si_without_p));
+ ASSERT_STREQ(format_bytes_full(buf, sizeof buf, val, FORMAT_BYTES_USE_IEC | FORMAT_BYTES_BELOW_POINT | (trailing_B ? FORMAT_BYTES_TRAILING_B : 0)), iec_with_p);
+ ASSERT_STREQ(format_bytes_full(buf, sizeof buf, val, FORMAT_BYTES_USE_IEC | (trailing_B ? FORMAT_BYTES_TRAILING_B : 0)), iec_without_p);
+ ASSERT_STREQ(format_bytes_full(buf, sizeof buf, val, FORMAT_BYTES_BELOW_POINT | (trailing_B ? FORMAT_BYTES_TRAILING_B : 0)), si_with_p);
+ ASSERT_STREQ(format_bytes_full(buf, sizeof buf, val, trailing_B ? FORMAT_BYTES_TRAILING_B : 0), si_without_p);
}
TEST(format_bytes) {