diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-20 14:05:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-20 14:05:43 +0300 |
commit | 042c4f09e34157522692d6f99f5c51bc04e8f27a (patch) | |
tree | fe25080062563298513d4ef977da025a39dd5b7e /src/utils/stringutils_unittest.cc | |
parent | 378441b559615cc96150e64137ae2ce02d23d2f2 (diff) | |
download | manaplus-042c4f09e34157522692d6f99f5c51bc04e8f27a.tar.gz manaplus-042c4f09e34157522692d6f99f5c51bc04e8f27a.tar.bz2 manaplus-042c4f09e34157522692d6f99f5c51bc04e8f27a.tar.xz manaplus-042c4f09e34157522692d6f99f5c51bc04e8f27a.zip |
fix possible issue in string comparison
Diffstat (limited to 'src/utils/stringutils_unittest.cc')
-rw-r--r-- | src/utils/stringutils_unittest.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc index 8f28f5c10..06ddaefd4 100644 --- a/src/utils/stringutils_unittest.cc +++ b/src/utils/stringutils_unittest.cc @@ -144,7 +144,11 @@ TEST(stringuntils, compareStrI1) EXPECT_TRUE(compareStrI(str1, str2) < 0); str1 = "test"; - str2 = "aest1"; + str2 = "aest1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + EXPECT_TRUE(compareStrI(str1, str2) > 0); + + str1 = "testaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + str2 = "testaa"; EXPECT_TRUE(compareStrI(str1, str2) > 0); } |