Update tests for new check library & osx

This commit is contained in:
Nils O. Selåsdal
2025-06-28 00:56:58 +02:00
parent 9d2ed015f3
commit fb8979d695
29 changed files with 449 additions and 27 deletions
+18
View File
@@ -6,6 +6,7 @@
START_TEST (test_dstr_basics)
{
struct DStr str;
int rc;
@@ -46,9 +47,11 @@ START_TEST (test_dstr_basics)
//just test that this doesn't crash:
uc_dstr_init(&str);
uc_dstr_destroy(&str);
}
END_TEST
START_TEST (test_dstr_init)
{
struct DStr str;
int rc;
@@ -65,9 +68,11 @@ START_TEST (test_dstr_init)
ck_assert_str_eq(uc_dstr_str(&str), "He");
uc_dstr_destroy(&str);
}
END_TEST
START_TEST (test_dstr_own)
{
struct DStr str;
uc_dstr_init_str(&str, "init");
@@ -76,8 +81,10 @@ START_TEST (test_dstr_own)
ck_assert_str_eq(uc_dstr_str(&str), "Hello !");
uc_dstr_destroy(&str);
}
END_TEST
START_TEST (test_dstr_own_steal)
{
struct DStr str;
char *s;
@@ -93,9 +100,11 @@ START_TEST (test_dstr_own_steal)
free(s);
uc_dstr_destroy(&str);
}
END_TEST
START_TEST (test_dstr_trim)
{
struct DStr str = UC_DSTR_INITIALIZER;
uc_dstr_append_str(&str, " \t \nHello !\r\n");
@@ -118,9 +127,11 @@ START_TEST (test_dstr_trim)
uc_dstr_destroy(&str);
}
END_TEST
START_TEST (test_dstr_replace)
{
struct DStr str;
size_t rc;
@@ -136,9 +147,11 @@ START_TEST (test_dstr_replace)
uc_dstr_destroy(&str);
}
END_TEST
START_TEST (test_dstr_filter)
{
struct DStr str;
size_t rc;
@@ -151,9 +164,11 @@ START_TEST (test_dstr_filter)
uc_dstr_destroy(&str);
}
END_TEST
START_TEST (test_dstr_sprintf)
{
struct DStr str;
size_t rc;
@@ -168,9 +183,11 @@ START_TEST (test_dstr_sprintf)
uc_dstr_destroy(&str);
}
END_TEST
START_TEST (test_dstr_copy)
{
struct DStr str;
struct DStr copy;
size_t rc;
@@ -195,6 +212,7 @@ START_TEST (test_dstr_copy)
uc_dstr_destroy(&str);
uc_dstr_destroy(&copy);
}
END_TEST
Suite *dstr_suite(void)