summaryrefslogtreecommitdiffstats
path: root/src/test/test-dns-domain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test-dns-domain.c')
-rw-r--r--src/test/test-dns-domain.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/test/test-dns-domain.c b/src/test/test-dns-domain.c
index 6c107e2..d775601 100644
--- a/src/test/test-dns-domain.c
+++ b/src/test/test-dns-domain.c
@@ -16,20 +16,20 @@ static void test_dns_label_unescape_one(const char *what, const char *expect, si
r = dns_label_unescape(&w, buffer, buffer_sz, 0);
assert_se(r == ret);
if (r >= 0)
- assert_se(streq(buffer, expect));
+ ASSERT_STREQ(buffer, expect);
w = what;
r = dns_label_unescape(&w, buffer, buffer_sz, DNS_LABEL_LDH);
assert_se(r == ret_ldh);
if (r >= 0)
- assert_se(streq(buffer, expect));
+ ASSERT_STREQ(buffer, expect);
w = what;
r = dns_label_unescape(&w, buffer, buffer_sz, DNS_LABEL_NO_ESCAPES);
const int ret_noe = strchr(what, '\\') ? -EINVAL : ret;
assert_se(r == ret_noe);
if (r >= 0)
- assert_se(streq(buffer, expect));
+ ASSERT_STREQ(buffer, expect);
}
TEST(dns_label_unescape) {
@@ -131,12 +131,12 @@ static void test_dns_label_unescape_suffix_one(const char *what, const char *exp
r = dns_label_unescape_suffix(what, &label, buffer, buffer_sz);
assert_se(r == ret1);
if (r >= 0)
- assert_se(streq(buffer, expect1));
+ ASSERT_STREQ(buffer, expect1);
r = dns_label_unescape_suffix(what, &label, buffer, buffer_sz);
assert_se(r == ret2);
if (r >= 0)
- assert_se(streq(buffer, expect2));
+ ASSERT_STREQ(buffer, expect2);
}
TEST(dns_label_unescape_suffix) {
@@ -173,7 +173,7 @@ static void test_dns_label_escape_one(const char *what, size_t l, const char *ex
if (r < 0)
return;
- assert_se(streq_ptr(expect, t));
+ ASSERT_STREQ(expect, t);
}
TEST(dns_label_escape) {
@@ -193,7 +193,7 @@ static void test_dns_name_normalize_one(const char *what, const char *expect, in
if (r < 0)
return;
- assert_se(streq_ptr(expect, t));
+ ASSERT_STREQ(expect, t);
}
TEST(dns_name_normalize) {
@@ -332,7 +332,7 @@ static void test_dns_name_reverse_one(const char *address, const char *name) {
assert_se(in_addr_from_string_auto(address, &familya, &a) >= 0);
assert_se(dns_name_reverse(familya, &a, &p) >= 0);
- assert_se(streq(p, name));
+ ASSERT_STREQ(p, name);
assert_se(dns_name_address(p, &familyb, &b) > 0);
assert_se(familya == familyb);
assert_se(in_addr_equal(familya, &a, &b));
@@ -349,7 +349,7 @@ static void test_dns_name_concat_one(const char *a, const char *b, int r, const
_cleanup_free_ char *p = NULL;
assert_se(dns_name_concat(a, b, 0, &p) == r);
- assert_se(streq_ptr(p, result));
+ ASSERT_STREQ(p, result);
}
TEST(dns_name_concat) {
@@ -486,14 +486,14 @@ static void test_dns_service_join_one(const char *a, const char *b, const char *
log_info("%s, %s, %s, →%d, %s", strnull(a), strnull(b), strnull(c), r, strnull(d));
assert_se(dns_service_join(a, b, c, &t) == r);
- assert_se(streq_ptr(t, d));
+ ASSERT_STREQ(t, d);
if (r < 0)
return;
assert_se(dns_service_split(t, &x, &y, &z) >= 0);
- assert_se(streq_ptr(a, x));
- assert_se(streq_ptr(b, y));
+ ASSERT_STREQ(a, x);
+ ASSERT_STREQ(b, y);
assert_se(dns_name_equal(c, z) > 0);
}
@@ -518,9 +518,9 @@ static void test_dns_service_split_one(const char *joined, const char *a, const
log_info("%s, %s, %s, %s, →%d", joined, strnull(a), strnull(b), strnull(c), r);
assert_se(dns_service_split(joined, &x, &y, &z) == r);
- assert_se(streq_ptr(x, a));
- assert_se(streq_ptr(y, b));
- assert_se(streq_ptr(z, c));
+ ASSERT_STREQ(x, a);
+ ASSERT_STREQ(y, b);
+ ASSERT_STREQ(z, c);
if (r < 0)
return;
@@ -549,7 +549,7 @@ static void test_dns_name_change_suffix_one(const char *name, const char *old_su
log_info("%s, %s, %s, →%s", name, old_suffix, new_suffix, strnull(result));
assert_se(dns_name_change_suffix(name, old_suffix, new_suffix, &s) == r);
- assert_se(streq_ptr(s, result));
+ ASSERT_STREQ(s, result);
}
TEST(dns_name_change_suffix) {
@@ -570,7 +570,7 @@ static void test_dns_name_suffix_one(const char *name, unsigned n_labels, const
log_info("%s, %u, → %s, %d", name, n_labels, strnull(result), ret);
assert_se(ret == dns_name_suffix(name, n_labels, &p));
- assert_se(streq_ptr(p, result));
+ ASSERT_STREQ(p, result);
}
TEST(dns_name_suffix) {
@@ -660,7 +660,7 @@ static void test_dns_name_common_suffix_one(const char *a, const char *b, const
log_info("%s, %s, →%s", a, b, result);
assert_se(dns_name_common_suffix(a, b, &c) >= 0);
- assert_se(streq(c, result));
+ ASSERT_STREQ(c, result);
}
TEST(dns_name_common_suffix) {