Add test for hash of empty string

This commit is contained in:
Patrick Pelissier committed 2019-01-26 09:10:36 +01:00
1 parent 9863a8325c
commit 4685aac454
1 file changed
+3
+3
View File
@@ -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."));