Improve coverage
This commit is contained in:
1 parent
08a4dfbe4c
commit
c97a68029b
1 file changed
+5
@@ -29,6 +29,7 @@ static void test1(void)
|
|||||||
M_LET(s1, s2, string_t) {
|
M_LET(s1, s2, string_t) {
|
||||||
string_set_str(s1, "Success!");
|
string_set_str(s1, "Success!");
|
||||||
string_set(s2, s1);
|
string_set(s2, s1);
|
||||||
|
assert(string_equal_p(s1, s2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,6 +148,9 @@ int main(void)
|
|||||||
assert (strcmp(string_get_cstr(s1), "Hello beautiful world!") == 0);
|
assert (strcmp(string_get_cstr(s1), "Hello beautiful world!") == 0);
|
||||||
|
|
||||||
string_clean(s1);
|
string_clean(s1);
|
||||||
|
string_set_n (s2, s1, 0, 5);
|
||||||
|
assert(string_empty_p(s2));
|
||||||
|
|
||||||
string_set_str(s1, "Hello");
|
string_set_str(s1, "Hello");
|
||||||
string_cat_str(s1, ", world!");
|
string_cat_str(s1, ", world!");
|
||||||
assert (string_size(s1) == 13);
|
assert (string_size(s1) == 13);
|
||||||
@@ -419,6 +423,7 @@ int main(void)
|
|||||||
string_clear (s1);
|
string_clear (s1);
|
||||||
string_clear (s2);
|
string_clear (s2);
|
||||||
|
|
||||||
|
test1();
|
||||||
test_utf8_basic();
|
test_utf8_basic();
|
||||||
test_utf8_it();
|
test_utf8_it();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
Reference in new issue
Block a user