mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Fix tests
This commit is contained in:
parent
ed55ac6d81
commit
74992d9bd7
|
@ -2739,6 +2739,9 @@ int str_utf8_comp_nocase(const char *a, const char *b)
|
|||
|
||||
int str_utf8_comp_nocase_num(const char *a, const char *b, int num)
|
||||
{
|
||||
if(num <= 0)
|
||||
return 0;
|
||||
|
||||
int code_a;
|
||||
int code_b;
|
||||
const char *old_a = a;
|
||||
|
|
|
@ -72,8 +72,8 @@ TEST(Str, Utf8ToLower)
|
|||
EXPECT_TRUE(str_utf8_comp_nocase(a, b) > 0);
|
||||
EXPECT_TRUE(str_utf8_comp_nocase(b, a) < 0);
|
||||
|
||||
EXPECT_TRUE(str_utf8_comp_nocase_num("ÖlÜ", "ölüa", 3) == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_nocase_num("ÖlÜ", "ölüa", 4) != 0);
|
||||
EXPECT_TRUE(str_utf8_comp_nocase_num("ÖlÜ", "ölüa", 5) == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_nocase_num("ÖlÜ", "ölüa", 6) != 0);
|
||||
EXPECT_TRUE(str_utf8_comp_nocase_num("a", "z", 0) == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_nocase_num("a", "z", 1) != 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue