Add test for hash of empty string
This commit is contained in:
1 parent
9863a8325c
commit
4685aac454
1 file changed
+3
@@ -384,6 +384,9 @@ static void test0(void)
|
||||
string_init (s1);
|
||||
string_init (s2);
|
||||
|
||||
size_t h1 = string_hash(s1);
|
||||
assert (h1 != 0);
|
||||
|
||||
string_printf (s1, "Hello %d worlds. How do you do? I'm fine. Thank you! The weather is bad today. I should had brought my umbrella. Oh! You can lend me one! Thank you very much! No really thank you. I wouldn't be able to get in time for my job.", 2);
|
||||
assert (string_equal_str_p(s1, "Hello 2 worlds. How do you do? I'm fine. Thank you! The weather is bad today. I should had brought my umbrella. Oh! You can lend me one! Thank you very much! No really thank you. I wouldn't be able to get in time for my job."));
|
||||
|
||||
|
||||
Reference in new issue
Block a user