Skip to content

Commit

Permalink
[Coverage] Adding missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
P-p-H-d committed May 3, 2024
1 parent b2adc77 commit 8e33086
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test-mdict.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ static void test_init(void)
string_printf(str1, "%d", 2*i);
bool b = dict_str_erase (d1, str1);
assert (b);
b = dict_str_erase (d1, str1);
assert (!b);
}
for(int i = 0; i < s; i++) {
string_printf(str1, "%d", 2*i);
Expand All @@ -436,6 +438,16 @@ static void test_init(void)
string_printf(str2, "%d", 2*i+1);
dict_str_set_at (d1, str1, str2);
}
for(int i = 1; i < s; i+=5) {
string_printf(str1, "%d", 2*i);
bool b = dict_str_erase (d1, str1);
assert (b);
}
for(int i = 1; i < s; i+=5) {
string_printf(str1, "%d", 2*i);
string_printf(str2, "%d", 2*i+1);
string_set( *dict_str_safe_get(d1, str1), str2);
}
for(int i = 0; i < s; i++) {
string_printf(str1, "%d", 2*i);
bool b = dict_str_erase (d1, str1);
Expand Down

0 comments on commit 8e33086

Please sign in to comment.